| Home | Download | Screen shots | Discussion | Documentation | Links |
|---|
Inheritance diagram for ViewerOpenGL:

Public Types | |
| enum | { MAX_LIGHTS = 8 } |
| enum | LightType { LIGHT_UNUSED, LIGHT_DIRECTIONAL, LIGHT_POSITIONAL } |
| enum | EventType { EVENT_KEY_DOWN, EVENT_MOUSE_MOVE, EVENT_MOUSE_CLICK, EVENT_MOUSE_DRAG, EVENT_MOUSE_RELEASE } |
| enum | { KEY_HOME, KEY_LEFT, KEY_UP, KEY_RIGHT, KEY_DOWN, KEY_PAGE_UP, KEY_PAGE_DOWN } |
Public Methods | |
| ViewerOpenGL (Browser &browser) | |
| Construct a viewer for the specified Browser. | |
| virtual RenderMode | getRenderMode () |
| virtual double | getFrameRate () |
| virtual void | resetUserNavigation () |
| virtual void | getUserNavigation (VrmlMatrix &M) |
| virtual Object | beginObject (const char *name, bool retain) |
| virtual void | endObject () |
| 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) |
| virtual Object | insertBox (float x, float y, float z) |
| virtual Object | insertCone (float h, float r, bool bottom, bool side) |
| virtual Object | insertCylinder (float h, float r, bool, bool, bool) |
| 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) |
| 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) |
| virtual Object | insertLineSet (size_t, const float *, size_t, const long *, bool colorPerVertex, const float *color, size_t nColorIndex, const long *colorIndex) |
| virtual Object | insertPointSet (size_t npts, const float *points, const float *colors) |
| 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) |
| virtual Object | insertSphere (float radius) |
| virtual Object | insertDirLight (float a, float i, const float rgb[], const float xyz[]) |
| virtual Object | insertPointLight (float ambientIntensity, const float attenuation[], const float color[], float intensity, const float location[], float radius) |
| 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) |
| virtual Object | insertReference (Object existingObject) |
| virtual void | removeObject (Object key) |
| virtual void | enableLighting (bool) |
| virtual void | setColor (float r, float g, float b, float a=1.0) |
| virtual void | setFog (const float *, float, const char *) |
| virtual void | setMaterial (float ambientIntensity, const float diffuseColor[3], const float emissiveColor[3], float shininess, const float specularColor[3], float transparency) |
| virtual void | setMaterialMode (int nTexComponents, bool geometryColor) |
| virtual void | setSensitive (Node *object) |
| virtual void | scaleTexture (size_t, size_t, size_t, size_t, size_t, unsigned char *) |
| 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) |
| virtual TextureObject | insertSubTexture (size_t xoffset, size_t yoffset, size_t w, size_t h, size_t whole_w, size_t whole_h, size_t nc, bool repeat_s, bool repeat_t, const unsigned char *pixels, bool retainHint=false) |
| virtual void | insertTextureReference (TextureObject, int) |
| virtual void | removeTextureObject (TextureObject) |
| virtual void | setTextureTransform (const float center[2], float rotation, const float scale[2], const float translation[2]) |
| virtual void | setViewpoint (const float position[3], const float orientation[4], float fieldOfView, float avatarSize, float visLimit) |
| virtual void | transform (const VrmlMatrix &mat) |
Multiply the current modelview matrix by mat. | |
| virtual void | transformPoints (int nPoints, float *points) |
| virtual void | drawBSphere (const BSphere &bs, BVolume::Intersection intersection) |
| void | update (double time=0.0) |
| virtual void | redraw () |
| void | resize (int w, int h) |
| void | input (EventInfo *) |
Protected Types | |
| enum | CursorStyle { CURSOR_INHERIT, CURSOR_INFO, CURSOR_CYCLE, CURSOR_UP_DOWN, CURSOR_CROSSHAIR } |
| enum | { MAXSENSITIVE = 1000 } |
Protected Methods | |
| virtual void | wsPostRedraw ()=0 |
| virtual void | wsSetCursor (CursorStyle c)=0 |
| virtual void | wsSwapBuffers ()=0 |
| virtual void | wsSetTimer (double)=0 |
| void | initialize () |
| void | beginGeometry () |
| void | endGeometry () |
| void | step (float, float, float) |
| void | rot (float x, float y, float z, float a) |
| void | zoom (float) |
| void | rot_trackball (float x1, float y1, float x2, float y2) |
| void | handleKey (int) |
| void | handleButton (EventInfo *) |
| void | handleMouseDrag (int, int) |
| void | insertExtrusionCaps (unsigned int mask, size_t nSpine, const float *c, size_t nCrossSection, const float *cs) |
| bool | checkSensitive (int x, int y, EventType) |
Protected Attributes | |
| ModelviewMatrixStack | modelviewMatrixStack |
| bool | d_GLinitialized |
| bool | d_blend |
| bool | d_lit |
| bool | d_texture |
| bool | d_wireframe |
| int | d_window |
| int | d_winWidth |
| int | d_winHeight |
| float | d_background [3] |
| int | d_nObjects |
| int | d_nestedObjects |
| GLUtesselator * | tesselator |
| int | d_nSensitive |
| int | d_activeSensitive |
| int | d_overSensitive |
| Node * | d_sensitiveObject [MAXSENSITIVE] |
| bool | d_selectMode |
| double | d_selectZ |
| LightInfo | d_lightInfo [MAX_LIGHTS] |
| float | d_position [3] |
| float | d_zoom [3] |
| float | d_target [3] |
| float | d_orientation [4] |
| int | d_beginx |
| int | d_beginy |
| float | d_scale |
| float | d_translatex |
| float | d_translatey |
| float | d_translatez |
| float | d_lastquat [4] |
| float | d_curquat [4] |
| bool | d_rotationChanged |
| float | d_rotationMatrix [4][4] |
| bool | d_rotating |
| bool | d_scaling |
| bool | d_translating |
| bool | d_drawBSpheres |
| bool | d_cull |
| double | d_renderTime |
| double | d_renderTime1 |
A window-system specific subclass needs to redefine the pure virtual methods.
|
|
Construct a viewer for the specified Browser.
|
|
||||||||||||||||
|
Check for pickable objects. |
|
|
Multiply the current modelview matrix by
Implements Viewer. |