#include <glfx.h>
Inheritance diagram for GLFX::ISceneBuilder:

Public Types | |
| enum | { NODE_SIMPLE = 0, NODE_STATIC_MESH, NODE_LIGHT, NODE_CAMERA } |
| enum | { VERT_POSITION = 0, VERT_NORMAL, VERT_COLOR, VERT_TEXTURE0, VERT_TEXTURE1, VERT_TEXTURE2, VERT_TEXTURE3, VERT_TEXTURE4, VERT_TEXTURE5, VERT_TEXTURE6, VERT_TEXTURE7 } |
| enum | { ANIM_POSITION = 0, ANIM_ROTATION, ANIM_SCALE } |
Public Member Functions | |
| virtual bool | Initialize (EffectManager *fxMgr)=0 |
| virtual bool | Finalize ()=0 |
| virtual int | CreateNode (const char *nodeName, int type)=0 |
| virtual int | CreateMaterial (const char *materialName)=0 |
| virtual int | CreateAnimation (const char *animName)=0 |
| virtual void | SetNodeParentByName (int nodeId, const char *parentName)=0 |
| virtual void | SetNodeTM (int nodeId, const float *tm)=0 |
| virtual void | SetMeshParameters (int nodeId, GLenum primitiveType, unsigned long vertexCount, unsigned long indexCount, unsigned long primitiveGroupCount)=0 |
| virtual bool | SetMeshVertexData (int nodeId, unsigned long type, unsigned long dim, const float *data)=0 |
| virtual bool | SetMeshFaceIndices (int nodeId, const unsigned long *data)=0 |
| virtual void | SetMeshPrimitiveGroup (int nodeId, unsigned long groupId, unsigned long start, unsigned long count)=0 |
| virtual void | SetMeshMaterial (int nodeId, unsigned long groupId, int materialId)=0 |
| virtual void | SetLightColor (int nodeId, const float *color)=0 |
| virtual void | SetLightAttenuation (int nodeId, float attnStart, float attnEnd)=0 |
| virtual void | SetCameraFieldOfViewX (int nodeId, float fovx)=0 |
| virtual void | SetMaterialAmbientColor (int materialId, const float *color)=0 |
| virtual void | SetMaterialDiffuseColor (int materialId, const float *color)=0 |
| virtual void | SetMaterialSpecularColor (int materialId, const float *color)=0 |
| virtual void | SetMaterialSpecularLevel (int materialId, float level)=0 |
| virtual void | SetMaterialTransparency (int materialId, float transparency)=0 |
| virtual void | SetMaterialDiffuseMap (int materialId, const char *name)=0 |
| virtual void | SetMaterialGlossMap (int materialId, const char *name)=0 |
| virtual void | SetMaterialGlowMap (int materialId, const char *name)=0 |
| virtual void | SetMaterialBumpMap (int materialId, const char *name)=0 |
| virtual void | SetAnimationParameters (int animId, float startTime, float frequency, unsigned long frameCount)=0 |
| virtual void | SetAnimationNodeKeyframes (int animId, int nodeId, unsigned long type, float *data)=0 |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| virtual bool GLFX::ISceneBuilder::Initialize | ( | EffectManager * | fxMgr | ) | [pure virtual] |
Initialize scene builder.
| fxMgr | pointer to EffectManager |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual bool GLFX::ISceneBuilder::Finalize | ( | ) | [pure virtual] |
Finalize scene building.
After this method finishes the scene should be returned to user by some custom method.
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual int GLFX::ISceneBuilder::CreateNode | ( | const char * | nodeName, | |
| int | type | |||
| ) | [pure virtual] |
Create a node.
| nodeName | name of node | |
| type | node type, on of: NODE_SIMPLE, NODE_STATIC_MESH, NODE_LIGHT NODE_CAMERA |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual int GLFX::ISceneBuilder::CreateMaterial | ( | const char * | materialName | ) | [pure virtual] |
Create a material.
| materialName | name of material |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual int GLFX::ISceneBuilder::CreateAnimation | ( | const char * | animName | ) | [pure virtual] |
Create named animation.
| animName | name of animation |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetNodeParentByName | ( | int | nodeId, | |
| const char * | parentName | |||
| ) | [pure virtual] |
Sets node parent.
This method is used to refer to parent by name. This is useful, when the input file doesn't require a parent node to be defined before it's children.
| nodeId | node id | |
| parentName | name of parent node |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetNodeTM | ( | int | nodeId, | |
| const float * | tm | |||
| ) | [pure virtual] |
Sets node transform matrix.
| nodeId | node id | |
| tm | 16 float values representing rows of a 4x4 matrix. |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMeshParameters | ( | int | nodeId, | |
| GLenum | primitiveType, | |||
| unsigned long | vertexCount, | |||
| unsigned long | indexCount, | |||
| unsigned long | primitiveGroupCount | |||
| ) | [pure virtual] |
Sets mesh parameters: vertex, index and primitve group count.
| nodeId | node id | |
| primitiveType | OpenGL primitive type, like GL_TRIANGLES. | |
| vertexCount | number of vertices | |
| indexCount | number of indices | |
| primitiveGroupCount | number of primitive groups |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual bool GLFX::ISceneBuilder::SetMeshVertexData | ( | int | nodeId, | |
| unsigned long | type, | |||
| unsigned long | dim, | |||
| const float * | data | |||
| ) | [pure virtual] |
Sets mesh vertex data.
| nodeId | node id | |
| type | data type, one of: VERT_POSITION, VERT_NORMAL, VERT_COLOR, VERT_TEXTURE0, VERT_TEXTURE1, VERT_TEXTURE2, VERT_TEXTURE3, VERT_TEXTURE4, VERT_TEXTURE5, VERT_TEXTURE6, VERT_TEXTURE7. Note that not all types may be supported by a given implementation. In such case this method will return false. However this is not an error. | |
| dim | data dimension | |
| data | pointer to data |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual bool GLFX::ISceneBuilder::SetMeshFaceIndices | ( | int | nodeId, | |
| const unsigned long * | data | |||
| ) | [pure virtual] |
Sets mesh index data.
| nodeId | node id | |
| data | vertex to indices |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMeshPrimitiveGroup | ( | int | nodeId, | |
| unsigned long | groupId, | |||
| unsigned long | start, | |||
| unsigned long | count | |||
| ) | [pure virtual] |
Sets primitive group parameters.
| nodeId | node id | |
| groupId | number of primitive group to be modified | |
| start | first element of this group | |
| count | number of elements in this group |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMeshMaterial | ( | int | nodeId, | |
| unsigned long | groupId, | |||
| int | materialId | |||
| ) | [pure virtual] |
Sets mesh material.
| nodeId | node id | |
| groupId | primitive group id | |
| materialId | material id |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetLightColor | ( | int | nodeId, | |
| const float * | color | |||
| ) | [pure virtual] |
Sets node light color.
| nodeId | node id | |
| color | 4-float light color value (red, green, blue and alpha) |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetLightAttenuation | ( | int | nodeId, | |
| float | attnStart, | |||
| float | attnEnd | |||
| ) | [pure virtual] |
Sets light attenuation distance.
| nodeId | light node id | |
| attnStart | near attenuation distance. If this value is 0 near attenuation is disabled. | |
| attnEnd | far attenuation distance. If this value is 0 far attenuation is disabled. |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetCameraFieldOfViewX | ( | int | nodeId, | |
| float | fovx | |||
| ) | [pure virtual] |
Sets camera horizontal field of view.
| nodeId | node id | |
| fovx | field-of-view in degrees |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialAmbientColor | ( | int | materialId, | |
| const float * | color | |||
| ) | [pure virtual] |
Sets material amibent color.
| materialId | material id | |
| color | 4-float color value (red, green, blue and alpha) |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialDiffuseColor | ( | int | materialId, | |
| const float * | color | |||
| ) | [pure virtual] |
Sets material diffuse color.
| materialId | material id | |
| color | 4-float color value (red, green, blue and alpha) |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialSpecularColor | ( | int | materialId, | |
| const float * | color | |||
| ) | [pure virtual] |
Sets material specular color.
| materialId | material id | |
| color | 4-float color value (red, green, blue and alpha) |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialSpecularLevel | ( | int | materialId, | |
| float | level | |||
| ) | [pure virtual] |
Sets material specular level (exponent).
| materialId | material id | |
| level | specular level |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialTransparency | ( | int | materialId, | |
| float | transparency | |||
| ) | [pure virtual] |
Sets material transparency.
| materialId | material id | |
| transparency | transparency level: set to 0 for totally opaque materials, 1 totally transprent or any value in between |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialDiffuseMap | ( | int | materialId, | |
| const char * | name | |||
| ) | [pure virtual] |
Sets material diffuse texture.
| materialId | material id | |
| name | texture file name |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialGlossMap | ( | int | materialId, | |
| const char * | name | |||
| ) | [pure virtual] |
Sets material gloss (specular) texture.
| materialId | material id | |
| name | texture file name |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialGlowMap | ( | int | materialId, | |
| const char * | name | |||
| ) | [pure virtual] |
Sets material glow (self-illumination) texture.
| materialId | material id | |
| name | texture file name |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetMaterialBumpMap | ( | int | materialId, | |
| const char * | name | |||
| ) | [pure virtual] |
Sets material bump (normal) texture.
| materialId | material id | |
| name | texture file name |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetAnimationParameters | ( | int | animId, | |
| float | startTime, | |||
| float | frequency, | |||
| unsigned long | frameCount | |||
| ) | [pure virtual] |
Sets animation parameters.
| animId | animation id | |
| startTime | time of first frame (in seconds) | |
| frequency | frame rate (in 1/second) | |
| frameCount | number of frames in animation |
Implemented in GLFX::Scene::DefaultSceneBuilder.
| virtual void GLFX::ISceneBuilder::SetAnimationNodeKeyframes | ( | int | animId, | |
| int | nodeId, | |||
| unsigned long | type, | |||
| float * | data | |||
| ) | [pure virtual] |
Sets node animation track.
| animId | animation id | |
| nodeId | node id of animated node | |
| type | track type, one of ANIM_POSITION, ANIM_ROTATION or ANIM_SCALE. | |
| data | animation track data. Array of n-dimensional tuples of floats where n is 3 (ANIM_POSITION, ANIM_SCALE) or 4 (ANIM_ROTATION). Number of tuples is equal to frame number. Each tuple specifies transformation for a single frame. |
Implemented in GLFX::Scene::DefaultSceneBuilder.