VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtExampleModel.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 #pragma once
6 
9 
10 #include <vrvCore/DtModel.h>
11 
13 
14 namespace makVrv
15 {
16  class DtExampleModel : public DtModel
17  {
18  public:
19  // create an example model and example model instance object with the specified id, halfLength, and animateRate
20  DtExampleModel(DtDe& de, DtUniqueID id, double halfLength, double animateRate);
21 
22  virtual ~DtExampleModel();
23 
24  //required function for DtModel derrived classes
25  virtual void setSolid(bool isSolid);
26 
27  //set the is support model flag for the model
28  virtual void setIsSupportModel( bool isSupport );
29 
30  //set the position of the model
31  virtual void setPosition( int vtx, const DtVector& position );
32 
33  //set the orientation of the model
34  virtual void setOrientation( int vtx, const DtTaitBryan& orientation );
35 
36  //set whether the model is visible or not
37  virtual void setVisible(bool isVisible);
38 
39  //set whether to scale the model or not
40  virtual void setModelScalingEnabled( bool b );
41 
42  //set whether to locally scale the model or not
43  virtual void setLocalModelScalingEnabled( bool enabled );
44 
45  //set how much to locally scale the model
46  virtual void setLocalModelScalingAmount( float localScl );
47 
48  protected:
49 
50  // called by DtSceneObject to add the model to the scene
51  virtual void addToScene( const DtUniqueID& sceneObjectId,
53 
54  // called by DtSceneObject to remove the model from the scene
55  virtual void removeFromScene();
56 
57  protected:
58 
59  //used to connect model instances to the scene
61 
63  };
64 }
virtual void addToScene(const DtUniqueID &sceneObjectId, DtModelSetId modelSet, int visualizerType)
Virtual Functions to be implemented, add this model to the scene.
virtual void setModelScalingEnabled(bool b)
DtUniqueID sceneObjectId() const
Parent of the model.
virtual void setPosition(int vtx, const DtVector &position)
Set the position of a control vertex in the model.
int visualizerType() const
The visualizer type determines which channel-specific group node this model will be parented to...
virtual void removeFromScene()
Virtual Functions to be implemented, remove this model from the scene.
virtual void setIsSupportModel(bool isSupport)
Is this model part of the support group? (determines whether or not other scene objects can ground cl...
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:77
virtual void setSolid(bool isSolid)
Set whether or not other this model is drawn filled in.
virtual const DtTaitBryan & orientation(int vtx=0) const
Get the Orientation of a given point.
DtUniqueID mySceneObjectId
Definition: DtExampleModel.h:62
virtual const DtVector & position(int vtx=0) const
Get the Position of a given point.
DtOsgSceneConnector * mySceneConnector
Definition: DtExampleModel.h:60
virtual void setOrientation(int vtx, const DtTaitBryan &orientation)
Set the orientation of a vertex in the model.
Contains makVrv::DtOsgSceneConnector class.
Definition: DtExampleModel.h:16
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtModel class.
virtual void setLocalModelScalingEnabled(bool enabled)
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
DtModelSetId
Definition: DtModelSetEnums.h:19
virtual void setLocalModelScalingAmount(float localScl)
virtual DtModelSetId modelSet() const
Get the model set this model is part of.
DtExampleModel(DtDe &de, DtUniqueID id, double halfLength, double animateRate)
DtDe & de()
Get the DtDe object.
Definition: DtModel.h:182
virtual void setVisible(bool isVisible)
Set the visible state of the model.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)