Home | Download | Screen shots | Discussion | Documentation | Links |
---|
Inheritance diagram for Viewer:
Public Types | |
typedef long | Object |
An object handle. | |
typedef long | TextureObject |
An texture object handle. | |
enum | { MASK_NONE = 0, MASK_CCW = 1, MASK_CONVEX = 2, MASK_SOLID = 4, MASK_BOTTOM = 8, MASK_TOP = 16, MASK_SIDE = 32, MASK_COLOR_PER_VERTEX = 64, MASK_NORMAL_PER_VERTEX = 128 } |
enum | RenderMode { RENDER_MODE_DRAW, RENDER_MODE_PICK } |
The rendering mode. More... | |
Public Methods | |
virtual | ~Viewer ()=0 |
Destructor. | |
virtual RenderMode | getRenderMode ()=0 |
Get the rendering mode. | |
virtual double | getFrameRate ()=0 |
Get the frame rate. | |
virtual void | resetUserNavigation ()=0 |
Return view to the last bound Viewpoint. | |
virtual void | getUserNavigation (VrmlMatrix &M)=0 |
Get the user's navigation from the last bound viewpoint. | |
virtual Object | beginObject (const char *, bool=false)=0 |
Begin a display list. | |
virtual void | endObject ()=0 |
End a display list. | |
virtual Object | insertBackground (size_t nGroundAngles=0, const float *groundAngle=0, const float *groundColor=0, size_t nSkyAngles=0, const float *skyAngle=0, const float *skyColor=0, int *whc=0, unsigned char **pixels=0)=0 |
Insert a background into a display list. | |
virtual Object | insertBox (float, float, float)=0 |
Insert a box into a display list. | |
virtual Object | insertCone (float, float, bool, bool)=0 |
Insert a cone into a display list. | |
virtual Object | insertCylinder (float, float, bool, bool, bool)=0 |
Insert a cylinder into a display list. | |
virtual Object | insertElevationGrid (unsigned int mask, size_t nx, size_t nz, const float *height, float dx, float dz, const float *tc, const float *normals, const float *colors)=0 |
Insert an elevation grid into a display list. | |
virtual Object | insertExtrusion (unsigned int, size_t nOrientation, const float *orientation, size_t nScale, const float *scale, size_t nCrossSection, const float *crossSection, size_t nSpine, const float *spine)=0 |
Insert an extrusion into a display list. | |
virtual Object | insertLineSet (size_t nCoords, const float *coord, size_t nCoordIndex, const long *coordIndex, bool colorPerVertex, const float *color, size_t nColorIndex, const long *colorIndex)=0 |
Insert a line set into a display list. | |
virtual Object | insertPointSet (size_t nv, const float *v, const float *c)=0 |
Insert a point set into a display list. | |
virtual Object | insertShell (unsigned int mask, size_t npoints, const float *points, size_t nfaces, const long *faces, const float *tc, size_t ntci, const long *tci, const float *normal, size_t nni, const long *ni, const float *color, size_t nci, const long *ci)=0 |
Insert a shell into a display list. | |
virtual Object | insertSphere (float radius)=0 |
Insert a sphere into a display list. | |
virtual Object | insertDirLight (float, float, const float[], const float[])=0 |
Insert a directional light into a display list. | |
virtual Object | insertPointLight (float, const float[], const float[], float, const float[], float)=0 |
Insert a point light into a display list. | |
virtual Object | insertSpotLight (float ambientIntensity, const float attenuation[], float beamWidth, const float color[], float cutOffAngle, const float direction[], float intensity, const float location[], float radius)=0 |
Insert a point light into a display list. | |
virtual Object | insertReference (Object existingObject)=0 |
Insert a reference to an existing object into a display list. | |
virtual void | removeObject (Object)=0 |
virtual void | enableLighting (bool)=0 |
virtual void | setFog (const float *color, float visibilityRange, const char *fogType)=0 |
virtual void | setColor (float r, float g, float b, float a=1.0)=0 |
Set the color. | |
virtual void | setMaterial (float ambientIntensity, const float diffuseColor[3], const float emissiveColor[3], float shininess, const float specularColor[3], float transparency)=0 |
virtual void | setMaterialMode (int nTexComponents, bool geometryColor)=0 |
virtual void | setSensitive (Node *object)=0 |
virtual void | scaleTexture (size_t w, size_t h, size_t newW, size_t newH, size_t nc, unsigned char *pixels)=0 |
virtual TextureObject | insertTexture (size_t w, size_t h, size_t nc, bool repeat_s, bool repeat_t, const unsigned char *pixels, bool retainHint=false)=0 |
virtual void | insertTextureReference (TextureObject, int)=0 |
virtual void | removeTextureObject (TextureObject)=0 |
virtual void | setTextureTransform (const float center[2], float rotation, const float scale[2], const float translation[2])=0 |
virtual void | setViewpoint (const float position[3], const float orientation[4], float fieldOfView, float avatarSize, float visLimit)=0 |
virtual void | transform (const VrmlMatrix &mat)=0 |
Transform the modelview. | |
virtual void | transformPoints (int nPoints, float *points)=0 |
virtual const VrmlFrustum & | getFrustum () const |
virtual void | setFrustum (const VrmlFrustum &afrust) |
virtual BVolume::Intersection | intersectViewVolume (const BVolume &bvolume) const |
virtual void | drawBSphere (const BSphere &bs, BVolume::Intersection intersection)=0 |
Public Attributes | |
Browser & | browser |
The Browser associated with the Viewer. | |
Protected Methods | |
Viewer (Browser &browser) | |
Constructor. | |
Protected Attributes | |
VrmlFrustum | d_frust |
Private Methods | |
Viewer (const Viewer &) | |
Viewer & | operator= (const Viewer &) |
|
An object handle.
|
|
An texture object handle.
|
|
The rendering mode.
|
|
Destructor.
|
|
Constructor.
|
|
Begin a display list.
|
|
Draw a bounding sphere. Used for debugging view culling. Probably should be drawBVolume and handle aaboxes as well.
|
|
End a display list.
|
|
Get the frame rate.
|
|
|
|
Get the rendering mode.
|
|
Get the user's navigation from the last bound viewpoint.
|
|
Insert a background into a display list.
|
|
Insert a box into a display list.
|
|
Insert a cone into a display list.
|
|
Insert a cylinder into a display list.
|
|
Insert a directional light into a display list.
|
|
Insert an elevation grid into a display list.
|
|
Insert an extrusion into a display list.
|
|
Insert a line set into a display list.
|
|
Insert a point light into a display list.
|
|
Insert a point set into a display list.
|
|
Insert a reference to an existing object into a display list.
|
|
Insert a shell into a display list.
|
|
Insert a sphere into a display list.
|
|
Insert a point light into a display list.
|
|
Intersect the given bounding volume with the view volume. This goes into the viewer to provide a hook for systems that use non-standard view volumes. Most subclasses should be able to use the default implementation provided here. If your view volume is so strange that there's no way to cull to is, then reimplement to always return BVolume::inside.
|
|
Return view to the last bound Viewpoint.
|
|
Set the color. The default implementation is a nop. |
|
Transform the modelview.
Multiply the current modelview matrix by
Implemented in ViewerOpenGL. |
|
The Browser associated with the Viewer.
|