Scene Graph


Detailed Description

These classes are used for scene graph functionality: geometry, cameras, rendering, LOD, and simulation.


Classes

class  vtEnabledBase
class  vtTarget
class  vtNodeBase
class  vtGroupBase
class  vtTransformBase
class  vtMeshBase
class  vtMaterialBase
class  vtMaterialArrayBase
class  vtWindow
class  vtSceneBase
class  vtMeshFactory
class  vtDimension
struct  vtOBJFile
class  vtLodGrid
class  vtSimpleLodGrid
class  vtMaterial
class  vtMaterialArray
class  vtMesh
class  vtFont
class  vtTextMesh
struct  vtPrimInfo
class  vtMultiTexture
class  vtNode
class  vtNativeNode
class  vtGroup
class  vtTransform
class  vtLight
class  vtGeom
class  vtMovGeom
class  vtDynGeom
class  vtLOD
class  vtCamera
class  vtHUD
class  vtImageSprite
struct  vtHit
class  vtScene

Functions

vtGeomCreate3DCursor (float fSize, float fSmall, float fAlpha=0.5f)
vtGeomCreateBoundSphereGeom (const FSphere &sphere, int res=24)
vtMeshCreateSphereMesh (const FSphere &sphere, int res=24)
vtGeomCreateSphereGeom (const vtMaterialArray *pMats, int iMatIdx, int iVertType, float fRadius, int res)
vtGeomCreateCylinderGeom (const vtMaterialArray *pMats, int iMatIdx, int iVertType, float hHeight, float fRadius, int res, bool bTop=true, bool bBottom=true, bool bCentered=true, int direction=1)
vtGeomCreateLineGridGeom (const vtMaterialArray *pMats, int iMatIdx, const FPoint3 &min1, const FPoint3 &max1, int steps)
bool WriteGeomToOBJ (vtGeom *geom, const char *filename)
int vtIntersect (vtNode *pTop, const FPoint3 &start, const FPoint3 &end, vtHitList &hitlist, bool bLocalCoords=false, bool bNativeNodes=true)


Function Documentation

vtGeom* Create3DCursor float  fSize,
float  fSmall,
float  fAlpha
 

Create a "3d Cursor" geometry, which consists of 3 blocks (red, green, blue) along the XYZ axes.

Parameters:
fSize The overall width, height, and depth of the geometry
fSmall The width of the blocks (generally much smaller than fSize)
fAlpha The alpha value to use, from 0 (transparent) to 1 (opaque)

vtGeom* CreateBoundSphereGeom const FSphere sphere,
int  res
 

Create a wireframe sphere which is very useful for visually representing the bounding sphere of an object in the scene.

vtGeom* CreateCylinderGeom const vtMaterialArray pMats,
int  iMatIdx,
int  iVertType,
float  fHeight,
float  fRadius,
int  res,
bool  bTop,
bool  bBottom,
bool  bCentered,
int  direction
 

Create a cylinder geometry with the indicated attributes.

Parameters:
pMats The array of materials to use.
iMatIdx The index of the material to use.
iVertType Flags which indicate what type of information is stored with each vertex. This can be any combination of the following bit flags:
  • VT_Normals - a normal per vertex.
  • VT_Colors - a color per vertex.
  • VT_TexCoords - a texture coordinate (UV) per vertex.
fHeight The height of the cylinder.
fRadius The radius of the cylinder.
res The resolution (number of sides) of the cylinder.
bTop True to create the top of the cylinder.
bBottom True to create the bottom of the cylinder. You could set this to false, for example, if the cylinder is going to sit on a flat surface where you will never see its bottom.
bCentered True to create a cylinder centered around its origin, false for a cylinder with its base at the origin that extends outward.
direction An orientation, 0-2 corresponds to X, Y, Z. Default is 1 (Y).

vtGeom* CreateLineGridGeom const vtMaterialArray pMats,
int  iMatIdx,
const FPoint3 min1,
const FPoint3 max1,
int  steps
 

Create a grid of lines in the XZ plane. This can be useful as a reference object, like a sheet of graph paper.

vtGeom* CreateSphereGeom const vtMaterialArray pMats,
int  iMatIdx,
int  iVertType,
float  fRadius,
int  res
 

Create a sphere geometry with the indicated material, radius and resolution.

Parameters:
pMats The array of materials to use.
iMatIdx The index of the material to use.
iVertType Flags which indicate what type of information is stored with each vertex. This can be any combination of the following bit flags:
  • VT_Normals - a normal per vertex.
  • VT_Colors - a color per vertex.
  • VT_TexCoords - a texture coordinate (UV) per vertex.
fRadius The radius of the sphere.
res The resolution (tesselation) of the sphere. The number of vertices in the result will be res*res*2.

vtMesh* CreateSphereMesh const FSphere sphere,
int  res
 

Create a wireframe sphere which is very useful for visually representing the bounding sphere of an object in the scene.

int vtIntersect vtNode pTop,
const FPoint3 start,
const FPoint3 end,
vtHitList &  hitlist,
bool  bLocalCoords,
bool  bNativeNodes
 

Check for surface intersections along a line segment in space.

Parameters:
pTop The top of the scene graph that you want to search for intersections. This can be the root node if you want to seach your entire scene, or any other node to search a subgraph.
start The start point (world coordinates) of the line segment.
end The end point (world coordinates) of the line segment.
hitlist The results. If there are intersections (hits), they are placed in this list, which is simply a std::vector of vtHit objects. Each vtHit object gives information about the hit point.
bLocalCoords Pass true to get your results in local coordinates (in the frame of the object which was hit). Otherwise, result points are in world coordinates.
bNativeNodes Pass true to return the internal (native) scene graph node that was hit, when there is no corresponding vtNode. Pass false to always return a vtNode, by looking up the scene graph as needed.
Returns:
The number of intersection hits (size of the hitlist array).

bool WriteGeomToOBJ vtGeom geom,
const char *  filename
 

Write a geometry node to a old-fashioned Wavefront OBJ file.


Generated on Tue Apr 22 10:11:08 2008 for vtlib library by  doxygen 1.4.5