#include <Proto.h>
Inheritance diagram for Proto:
Public Member Functions | |
Proto (Scene *scene, const std::string &name) | |
virtual | ~Proto () |
virtual Node * | create (Scene *scene) |
Node * | getPrimaryNode () |
EventIn * | getEventIn (int index) const |
EventOut * | getEventOut (int index) const |
Field * | getField (int index) const |
ExposedField * | getExposedField (int index) const |
int | getNumFields () const |
int | getNumEventIns () const |
int | getNumEventOuts () const |
int | lookupEventIn (const std::string &name) const |
int | lookupEventOut (const std::string &name) const |
int | lookupField (const std::string &name) const |
int | lookupExposedField (const std::string &name) const |
const std::string & | getName () const |
void | write (FILE *f, int indent) const |
void | addElement (Element *element) |
void | addExposedField (ExposedField *exposedField) |
void | define (Node *primaryNode, NodeList *nodes) |
Protected Member Functions | |
void | addField (int fieldType, const std::string &name, FieldValue *defaultValue=NULL, float min=-FLT_MAX, float max=FLT_MAX) |
void | addField (int fieldType, const std::string &name, FieldValue *defaultValue, int nodeType) |
void | addField (int fieldType, const std::string &name, FieldValue *defaultValue, int flags, const char **strings) |
void | addEventIn (int fieldType, const std::string &name) |
void | addEventOut (int fieldType, const std::string &name) |
void | addExposedField (int fieldType, const std::string &name, FieldValue *defaultValue, float min=-FLT_MAX, float max=FLT_MAX) |
void | addExposedField (int fieldType, const std::string &name, FieldValue *defaultValue, int nodeType) |
void | addExposedField (int fieldType, const std::string &name, FieldValue *defaultValue, int flags, const char **strings) |
int | lookupSimpleEventIn (const std::string &name) const |
int | lookupSimpleEventOut (const std::string &name) const |
Protected Attributes | |
Scene * | _scene |
std::string | _name |
Array< EventIn * > | _eventIns |
Array< EventOut * > | _eventOuts |
Array< Field * > | _fields |
Array< ExposedField * > | _exposedFields |
NodeList * | _nodes |
Node * | _primaryNode |
Proto::Proto | ( | Scene * | scene, | |
const std::string & | name | |||
) |
Proto::~Proto | ( | ) | [virtual] |
Creates a Node (VRML ProtoBody). As the Proto(VRML Proto definition) is initialised in this class.
Reimplemented in ProtoInterpolator, ProtoAudioClip, ProtoBox, ProtoCollision, ProtoColor, ProtoColorInterpolator, ProtoCone, ProtoCoordinate, ProtoCoordinateInterpolator, ProtoCylinder, ProtoCylinderSensor, ProtoDefBody, ProtoDefBodyTex, ProtoDirectionalLight, ProtoElevationGrid, ProtoExtrusion, ProtoFog, ProtoFontStyle, ProtoGroup, ProtoHumanoid, ProtoImageTexture, ProtoIndexedFaceSet, ProtoIndexedLineSet, ProtoInline, ProtoJoint, ProtoLOD, ProtoMaterial, ProtoMaterialProperties, ProtoMovieTexture, ProtoNavigationInfo, ProtoNormal, ProtoNormalInterpolator, ProtoOrientationInterpolator, ProtoParticleBounce, ProtoParticleColorD, ProtoParticleSizeD, ProtoParticleSource, ProtoParticleVelocityD, ProtoPixelTexture, ProtoPlaneSensor, ProtoPointLight, ProtoPointSet, ProtoPositionInterpolator, ProtoProximitySensor, ProtoScalarInterpolator, ProtoScript, ProtoSegment, ProtoShape, ProtoSite, ProtoSound, ProtoSphere, ProtoSphereSensor, ProtoSpotLight, ProtoSwitch, ProtoText, ProtoTextureCoordinate, ProtoTextureTransform, ProtoTimeSensor, ProtoTouchSensor, ProtoTransform, ProtoViewpoint, ProtoVisibilitySensor, ProtoWorldInfo, and ProtoWrkAnimation.
Node* Proto::getPrimaryNode | ( | ) | [inline] |
EventIn* Proto::getEventIn | ( | int | index | ) | const [inline] |
index | the index in the Array containing EventIn* |
EventOut* Proto::getEventOut | ( | int | index | ) | const [inline] |
index | the index in the Array containing EventOut* |
Field* Proto::getField | ( | int | index | ) | const [inline] |
ExposedField* Proto::getExposedField | ( | int | index | ) | const [inline] |
index | the index in the Array containing Field* |
int Proto::getNumFields | ( | ) | const [inline] |
int Proto::getNumEventIns | ( | ) | const [inline] |
int Proto::getNumEventOuts | ( | ) | const [inline] |
int Proto::lookupEventIn | ( | const std::string & | name | ) | const |
int Proto::lookupEventOut | ( | const std::string & | name | ) | const |
int Proto::lookupField | ( | const std::string & | name | ) | const |
int Proto::lookupExposedField | ( | const std::string & | name | ) | const |
Looks if a ExposedField is contained in the ExposedField Array.
name | the name of the ExposedField to find it's index |
const std::string& Proto::getName | ( | ) | const [inline] |
Gets the name of this Proto.
void Proto::write | ( | FILE * | f, | |
int | indent | |||
) | const |
Outputs the contents of the Proto to a File
void Proto::addElement | ( | Element * | element | ) |
Adds the parsed VRML element to the appropriate Array. Appends to _fields,_eventIns, _eventOuts and calls addExposedField(ExposedField *).
void Proto::addExposedField | ( | ExposedField * | exposedField | ) |
Defines the primary node and the children nodes of the Proto.
void Proto::addField | ( | int | fieldType, | |
const std::string & | name, | |||
FieldValue * | defaultValue = NULL , |
|||
float | min = -FLT_MAX , |
|||
float | max = FLT_MAX | |||
) | [protected] |
void Proto::addField | ( | int | fieldType, | |
const std::string & | name, | |||
FieldValue * | defaultValue, | |||
int | nodeType | |||
) | [protected] |
void Proto::addField | ( | int | fieldType, | |
const std::string & | name, | |||
FieldValue * | defaultValue, | |||
int | flags, | |||
const char ** | strings | |||
) | [protected] |
void Proto::addEventIn | ( | int | fieldType, | |
const std::string & | name | |||
) | [protected] |
void Proto::addEventOut | ( | int | fieldType, | |
const std::string & | name | |||
) | [protected] |
void Proto::addExposedField | ( | int | fieldType, | |
const std::string & | name, | |||
FieldValue * | defaultValue, | |||
float | min = -FLT_MAX , |
|||
float | max = FLT_MAX | |||
) | [protected] |
void Proto::addExposedField | ( | int | fieldType, | |
const std::string & | name, | |||
FieldValue * | defaultValue, | |||
int | nodeType | |||
) | [protected] |
void Proto::addExposedField | ( | int | fieldType, | |
const std::string & | name, | |||
FieldValue * | defaultValue, | |||
int | flags, | |||
const char ** | strings | |||
) | [protected] |
int Proto::lookupSimpleEventIn | ( | const std::string & | name | ) | const [protected] |
int Proto::lookupSimpleEventOut | ( | const std::string & | name | ) | const [protected] |
Scene* Proto::_scene [protected] |
handle to the current Scene.
std::string Proto::_name [protected] |
the name of the Proto
Array<EventIn *> Proto::_eventIns [protected] |
An Array(Vector) of EventIn object ptrs
Array<EventOut *> Proto::_eventOuts [protected] |
An Array(Vector) of EventOut object ptrs
Array<Field *> Proto::_fields [protected] |
An Array(Vector) of Field object ptrs
Array<ExposedField *> Proto::_exposedFields [protected] |
An Array(Vector) of ExposedField object ptrs
NodeList* Proto::_nodes [protected] |
An Array of Nodes
Node* Proto::_primaryNode [protected] |