#include <OSGBillboard.h>
Inheritance diagram for OSG::Billboard:

dcast | |
| OSG_GEN_INTERNALPTR (AttachmentContainer) | |
| typedef AttachmentContainer | Self |
| typedef FieldContainerAttachment | AttachmentObj |
| typedef FieldContainerAttachmentPtr | AttachmentObjPtr |
| typedef SFFieldContainerAttachmentPtrMap | SFAttachmentObjPtrMap |
| typedef SFAttachmentObjPtrMap::StoredType | AttachmentObjPtrMap |
| typedef AttachmentObjPtrMap::iterator | AttachmentObjPtrMapIt |
Public Types | |
| enum | { AxisOfRotationFieldId = Inherited::NextFieldId, FocusOnCameraFieldId = AxisOfRotationFieldId + 1, AlignToScreenFieldId = FocusOnCameraFieldId + 1, MinAngleFieldId = AlignToScreenFieldId + 1, MaxAngleFieldId = MinAngleFieldId + 1, NextFieldId = MaxAngleFieldId + 1 } |
| typedef Group | ParentContainer |
| typedef Inherited::TypeObject | TypeObject |
| typedef TypeObject::InitPhase | InitPhase |
| typedef MFParentFieldContainerPtr | ParentField |
| typedef const MFParentFieldContainerPtr * | ParentFieldPtr |
| typedef MFParentFieldContainerPtr::const_iterator | ParentFieldIt |
Type definitions | |
| typedef Field *(ReflexiveContainer::*) | FieldEditMethod (void) |
| typedef const Field *(ReflexiveContainer::*) | FieldGetMethod (void) const |
Public Member Functions | |
| OSG_GEN_INTERNALPTR (Billboard) | |
| OSG_GEN_INTERNALPTR (Group) | |
| OSG_GEN_INTERNALPTR (NodeCore) | |
| OSG_RC_FIRST_FIELD_DECL (Parents) | |
| OSG_RC_LAST_FIELD_DECL (Parents) | |
Sync | |
| virtual void | changed (ConstFieldMaskArg whichField, UInt32 origin, BitVector detail) |
| react to field changes | |
calc the model matrix | |
| void | calcMatrix (const Matrix &camToWorld, const Matrix &mToWorld, Matrix &mResult) |
Output | |
| virtual void | dump (UInt32 uiIndent=0, const BitVector bvFlags=0) const |
| output the instance for debug purposes | |
Type definitions | |
| OSG_GEN_INTERNALPTR (FieldContainer) | |
| OSG_RC_FIRST_FIELD_DECL (ChangedCallbacks) | |
| OSG_RC_LAST_FIELD_DECL (ChangedCallbacks) | |
FieldContainer Get | |
| virtual FieldContainerType & | getType (void) |
| virtual const FieldContainerType & | getType (void) const |
| virtual UInt32 | getContainerSize (void) const |
Field Get | |
| SFVec3f * | editSFAxisOfRotation (void) |
| const SFVec3f * | getSFAxisOfRotation (void) const |
| SFBool * | editSFFocusOnCamera (void) |
| const SFBool * | getSFFocusOnCamera (void) const |
| SFBool * | editSFAlignToScreen (void) |
| const SFBool * | getSFAlignToScreen (void) const |
| SFReal32 * | editSFMinAngle (void) |
| const SFReal32 * | getSFMinAngle (void) const |
| SFReal32 * | editSFMaxAngle (void) |
| const SFReal32 * | getSFMaxAngle (void) const |
| Vec3f & | editAxisOfRotation (void) |
| Get the value of the Billboard::_sfAxisOfRotation field. | |
| const Vec3f & | getAxisOfRotation (void) const |
| Get the value of the Billboard::_sfAxisOfRotation field. | |
| bool & | editFocusOnCamera (void) |
| Get the value of the Billboard::_sfFocusOnCamera field. | |
| const bool & | getFocusOnCamera (void) const |
| Get the value of the Billboard::_sfFocusOnCamera field. | |
| bool & | editAlignToScreen (void) |
| Get the value of the Billboard::_sfAlignToScreen field. | |
| const bool & | getAlignToScreen (void) const |
| Get the value of the Billboard::_sfAlignToScreen field. | |
| Real32 & | editMinAngle (void) |
| Get the value of the Billboard::_sfMinAngle field. | |
| const Real32 & | getMinAngle (void) const |
| Get the value of the Billboard::_sfMinAngle field. | |
| Real32 & | editMaxAngle (void) |
| Get the value of the Billboard::_sfMaxAngle field. | |
| const Real32 & | getMaxAngle (void) const |
| Get the value of the Billboard::_sfMaxAngle field. | |
Field Set | |
| void | setAxisOfRotation (const Vec3f &value) |
| Set the value of the Billboard::_sfAxisOfRotation field. | |
| void | setFocusOnCamera (const bool &value) |
| Set the value of the Billboard::_sfFocusOnCamera field. | |
| void | setAlignToScreen (const bool &value) |
| Set the value of the Billboard::_sfAlignToScreen field. | |
| void | setMinAngle (const Real32 &value) |
| Set the value of the Billboard::_sfMinAngle field. | |
| void | setMaxAngle (const Real32 &value) |
| Set the value of the Billboard::_sfMaxAngle field. | |
Binary Access | |
| virtual UInt32 | getBinSize (ConstFieldMaskArg whichField) |
| virtual void | copyToBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField) |
| virtual void | copyFromBin (BinaryDataHandler &pMem, ConstFieldMaskArg whichField) |
Copy | |
| virtual FieldContainerPtr | shallowCopy (void) const |
Constructors | |
| OSG_RC_FIRST_FIELD_DECL (Attachments) | |
| OSG_RC_LAST_FIELD_DECL (Attachments) | |
Helper | |
| const MFParentFieldContainerPtr & | getParents (void) const |
Get | |
| const MFParentFieldContainerPtr * | getMFParents (void) const |
Comparison | |
| virtual void | invalidateVolume (void) |
Dump | |
| void | addParent (FieldContainerPtrConst &parent, const UInt16 uiStoredInFieldId=InvalidParentEPos) |
| void | subParent (FieldContainerPtrConst &parent) |
Set | |
| void | addAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0) |
| void | subAttachment (const AttachmentObjPtr attachmentP, UInt16 binding=0) |
| AttachmentObjPtr | findAttachment (UInt32 groupId, UInt16 binding=0) |
| AttachmentObjPtr | findAttachment (const FieldContainerType &type, UInt16 binding=0) |
your_category | |
| const SFAttachmentObjPtrMap * | getSFAttachments (void) const |
Set | |
| void | callChangedFunctors (ConstFieldMaskArg whichField) |
Container Access | |
| UInt32 | addChangedFunctor (ChangedFunctor func, std::string createSymbol) |
| template<class FunctorT> | |
| void | subChangedFunctor (FunctorT func) |
| void | subChangedFunctor (UInt32 uiId) |
| void | clearChangedFunctors (void) |
Field Flags | |
| const FieldFlags * | getFieldFlags (void) |
Helper | |
| OSG_SYSTEM_DLLMAPPING void | addReference (void) |
| OSG_SYSTEM_DLLMAPPING void | subReference (void) |
| OSG_SYSTEM_DLLMAPPING void | subReferenceLocalVar (void) |
| OSG_SYSTEM_DLLMAPPING Int32 | getRefCount (void) const |
dcast | |
| OSG_SYSTEM_DLLMAPPING UInt32 | getTypeId (void) const |
| OSG_SYSTEM_DLLMAPPING UInt16 | getGroupId (void) const |
| OSG_SYSTEM_DLLMAPPING const Char8 * | getTypeName (void) const |
Get Field | |
| OSG_SYSTEM_DLLMAPPING UInt32 | getNumFields (void) const |
| OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr | editField (UInt32 fieldId) |
| OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr | editField (const Char8 *fieldName) |
| OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr | getField (UInt32 fieldId) const |
| OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr | getField (const Char8 *fieldName) const |
Get Field Description | |
| OSG_SYSTEM_DLLMAPPING FieldDescriptionBase * | getFieldDescription (UInt32 fieldId) |
| OSG_SYSTEM_DLLMAPPING FieldDescriptionBase * | getFieldDescription (const Char8 *fieldName) |
Comparison | |
| OSG_SYSTEM_DLLMAPPING EditFieldHandlePtr | invalidEditField (void) |
| OSG_SYSTEM_DLLMAPPING GetFieldHandlePtr | invalidGetField (void) const |
Static Public Member Functions | |
Class Get | |
| static FieldContainerType & | getClassType (void) |
| access the type of the class | |
| static UInt32 | getClassTypeId (void) |
| access the numerical type of the class | |
| static UInt16 | getClassGroupId (void) |
| access the type of the class | |
Construction | |
| static BillboardPtr | create (void) |
| create a new instance of the class | |
| static BillboardPtr | createEmpty (void) |
| create an empty new instance of the class, do not copy the prototype | |
Public Attributes | |
dcast | |
| OSG_ABSTR_FIELD_CONTAINER_DECL | |
Static Public Attributes | |
| static const OSG::BitVector | AxisOfRotationFieldMask |
| static const OSG::BitVector | FocusOnCameraFieldMask |
| static const OSG::BitVector | AlignToScreenFieldMask |
| static const OSG::BitVector | MinAngleFieldMask |
| static const OSG::BitVector | MaxAngleFieldMask |
| static const OSG::BitVector | NextFieldMask |
| static const bool | isNodeCore = true |
Protected Member Functions | |
Constructors | |
| Billboard (void) | |
| Constructor. | |
| Billboard (const Billboard &source) | |
| Copy Constructor. | |
Destructors | |
| virtual | ~Billboard (void) |
| Destructor. | |
NodeCore Specific | |
| virtual void | accumulateMatrix (Matrix &result) |
| void | adjustVolume (Volume &volume) |
Draw & Intersect & Render | |
| ActionBase::ResultE | drawEnter (Action *action) |
| ActionBase::ResultE | drawLeave (Action *action) |
| ActionBase::ResultE | intersectEnter (Action *action) |
| ActionBase::ResultE | intersectLeave (Action *action) |
| ActionBase::ResultE | renderEnter (Action *action) |
| ActionBase::ResultE | renderLeave (Action *action) |
Generic Field Access | |
| GetFieldHandlePtr | getHandleAxisOfRotation (void) const |
| EditFieldHandlePtr | editHandleAxisOfRotation (void) |
| GetFieldHandlePtr | getHandleFocusOnCamera (void) const |
| EditFieldHandlePtr | editHandleFocusOnCamera (void) |
| GetFieldHandlePtr | getHandleAlignToScreen (void) const |
| EditFieldHandlePtr | editHandleAlignToScreen (void) |
| GetFieldHandlePtr | getHandleMinAngle (void) const |
| EditFieldHandlePtr | editHandleMinAngle (void) |
| GetFieldHandlePtr | getHandleMaxAngle (void) const |
| EditFieldHandlePtr | editHandleMaxAngle (void) |
Sync | |
| virtual void | resolveLinks (void) |
Action Callbacks | |
| ActionBase::ResultE | intersect (Action *action) |
Edit | |
| GetFieldHandlePtr | getHandleParents (void) const |
Sync | |
| EditFieldHandlePtr | editHandleAttachments (void) |
| GetFieldHandlePtr | getHandleAttachments (void) const |
Edit | |
| OSG_SYSTEM_DLLMAPPING void | subReferenceUnresolved (void) |
MT Construction | |
| OSG_SYSTEM_DLLMAPPING void | onCreateAspect (const FieldContainer *createAspect, const FieldContainer *source=NULL) |
| OSG_SYSTEM_DLLMAPPING void | onCreate (const FieldContainer *source=NULL) |
| virtual OSG_SYSTEM_DLLMAPPING void | onDestroy (UInt32 uiContainerId) |
Changed | |
| OSG_SYSTEM_DLLMAPPING void | onCreate (const ReflexiveContainer *source=NULL) |
| virtual OSG_SYSTEM_DLLMAPPING void | onDestroyAspect (UInt32 uiContainerId, UInt32 uiAspect) |
MT Construction | |
| virtual OSG_SYSTEM_DLLMAPPING bool | deregister (UInt32 uiContainerId) |
MT Construction | |
| OSG_SYSTEM_DLLMAPPING void | registerChangedContainer (void) |
| virtual OSG_SYSTEM_DLLMAPPING void | registerChangedContainerV (void) |
Local Edit | |
| void | editSField (ConstFieldMaskArg whichField) |
| template<class FieldT> | |
| void | editMField (ConstFieldMaskArg whichField, FieldT &oField) |
MT Destruction | |
| void | execEndEdit (ConstFieldMaskArg whichField) |
| void | clearChangeEntry (ContainerChangeEntry *pRef) |
Edit | |
| OSG_SYSTEM_DLLMAPPING void | setId (UInt32 uiContainerId) |
| OSG_SYSTEM_DLLMAPPING UInt32 | getId (void) const |
Static Protected Member Functions | |
| static void | classDescInserter (TypeObject &oType) |
| static void | classDescInserter (TypeObject &oType) |
| static Char8 * | getClassname (void) |
Fields | |
| static void | classDescInserter (TypeObject &oType) |
Init | |
| static void | initMethod (InitPhase ePhase) |
MT Construction | |
| template<class ObjectT> | |
| static void | newPtr (typename ObjectT::ObjPtr &result, const ObjectT *prototypeP) |
| template<class ObjectT> | |
| static void | newPtr (typename ObjectT::ObjPtr &result) |
Protected Attributes | |
| Matrix | _camTransform |
Fields | |
| SFVec3f | _sfAxisOfRotation |
| SFBool | _sfFocusOnCamera |
| SFBool | _sfAlignToScreen |
| SFReal32 | _sfMinAngle |
| SFReal32 | _sfMaxAngle |
Fields | |
| MFParentFieldContainerPtr | _mfParents |
Fields | |
| SFAttachmentObjPtrMap | _sfAttachments |
Type information | |
| FieldFlags * | _pFieldFlags |
| MFChangedFunctorCallback | _mfChangedFunctors |
| Int32 | _iRefCount |
Member | |
| BitVector | _bvChanged |
| ContainerChangeEntry * | _pContainerChanges |
| UInt32 | _uiContainerId |
Static Protected Attributes | |
| static TypeObject | _type |
Private Types | |
| typedef BillboardBase | Inherited |
Private Member Functions | |
| void | operator= (const Billboard &source) |
Static Private Member Functions | |
| static void | initMethod (InitPhase ePhase) |
Friends | |
| class | FieldContainer |
| class | BillboardBase |
Definition at line 55 of file OSGBillboard.h.
typedef BillboardBase OSG::Billboard::Inherited [private] |
typedef Group OSG::BillboardBase::ParentContainer [inherited] |
typedef Inherited::TypeObject OSG::BillboardBase::TypeObject [inherited] |
typedef TypeObject::InitPhase OSG::BillboardBase::InitPhase [inherited] |
typedef MFParentFieldContainerPtr OSG::NodeCore::ParentField [inherited] |
Definition at line 77 of file OSGNodeCore.h.
typedef const MFParentFieldContainerPtr* OSG::NodeCore::ParentFieldPtr [inherited] |
Definition at line 78 of file OSGNodeCore.h.
typedef MFParentFieldContainerPtr::const_iterator OSG::NodeCore::ParentFieldIt [inherited] |
Definition at line 79 of file OSGNodeCore.h.
typedef AttachmentContainer OSG::AttachmentContainer::Self [inherited] |
Reimplemented from OSG::FieldContainer.
Reimplemented in OSG::ScreenLOD, OSG::MultiCore, OSG::ChunkOverrideGroup, OSG::Node, OSG::StageHandlerMixin< ContainerMixinHead< ShadowMapEngineDesc > >, and OSG::StageHandlerMixin< ContainerMixinHead< StageDesc > >.
Definition at line 68 of file OSGAttachmentContainer.h.
typedef FieldContainerAttachment OSG::AttachmentContainer::AttachmentObj [inherited] |
Definition at line 70 of file OSGAttachmentContainer.h.
typedef FieldContainerAttachmentPtr OSG::AttachmentContainer::AttachmentObjPtr [inherited] |
Definition at line 71 of file OSGAttachmentContainer.h.
typedef SFFieldContainerAttachmentPtrMap OSG::AttachmentContainer::SFAttachmentObjPtrMap [inherited] |
Definition at line 72 of file OSGAttachmentContainer.h.
typedef SFAttachmentObjPtrMap::StoredType OSG::AttachmentContainer::AttachmentObjPtrMap [inherited] |
Definition at line 74 of file OSGAttachmentContainer.h.
typedef AttachmentObjPtrMap::iterator OSG::AttachmentContainer::AttachmentObjPtrMapIt [inherited] |
Definition at line 75 of file OSGAttachmentContainer.h.
typedef Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldEditMethod(void) [inherited] |
Definition at line 79 of file OSGReflexiveContainer.h.
typedef const Field*(ReflexiveContainer::*) OSG::ReflexiveContainer::FieldGetMethod(void) const [inherited] |
Definition at line 81 of file OSGReflexiveContainer.h.
anonymous enum [inherited] |
| AxisOfRotationFieldId | |
| FocusOnCameraFieldId | |
| AlignToScreenFieldId | |
| MinAngleFieldId | |
| MaxAngleFieldId | |
| NextFieldId |
Definition at line 98 of file OSGBillboardBase.h.
00099 { 00100 AxisOfRotationFieldId = Inherited::NextFieldId, 00101 FocusOnCameraFieldId = AxisOfRotationFieldId + 1, 00102 AlignToScreenFieldId = FocusOnCameraFieldId + 1, 00103 MinAngleFieldId = AlignToScreenFieldId + 1, 00104 MaxAngleFieldId = MinAngleFieldId + 1, 00105 NextFieldId = MaxAngleFieldId + 1 00106 };
| Billboard::Billboard | ( | void | ) | [protected] |
Definition at line 69 of file OSGBillboard.cpp.
00069 : 00070 Inherited (), 00071 _camTransform() 00072 { 00073 }
| Billboard::Billboard | ( | const Billboard & | source | ) | [protected] |
Definition at line 77 of file OSGBillboard.cpp.
00077 : 00078 Inherited (source ), 00079 _camTransform(source._camTransform) 00080 { 00081 }
| Billboard::~Billboard | ( | void | ) | [protected, virtual] |
| void Billboard::changed | ( | ConstFieldMaskArg | whichField, | |
| UInt32 | origin, | |||
| BitVector | detail | |||
| ) | [virtual] |
Reimplemented from OSG::Group.
Definition at line 120 of file OSGBillboard.cpp.
References OSG::Group::changed().
00123 { 00124 Inherited::changed(whichField, origin, details); 00125 }
Definition at line 165 of file OSGBillboard.cpp.
References _camTransform, OSG::BillboardBase::_sfAlignToScreen, OSG::BillboardBase::_sfFocusOnCamera, OSG::VectorInterface< ValueTypeT, StorageInterfaceT >::cross(), OSG::BillboardBase::getAxisOfRotation(), OSG::BillboardBase::getMaxAngle(), OSG::BillboardBase::getMinAngle(), OSG::QuaternionBase< ValueTypeT >::getValueAsAxisRad(), OSG::TransformationMatrix< ValueTypeT >::invertFrom(), OSG::QuaternionBase< ValueTypeT >::mult(), OSG::TransformationMatrix< ValueTypeT >::mult(), OSG::QuaternionBase< ValueTypeT >::multVec(), OSG::VectorInterface< ValueTypeT, StorageInterfaceT >::normalize(), OSG::VectorInterface< ValueTypeT, StorageInterfaceT >::Null, OSG::TransformationMatrix< ValueTypeT >::setTransform(), OSG::QuaternionBase< ValueTypeT >::setValue(), OSG::PointInterface< ValueTypeT, StorageInterfaceT >::setValue(), and OSG::QuaternionBase< ValueTypeT >::setValueAsAxisRad().
Referenced by renderEnter().
00168 { 00169 Pnt3f eyepos(0.f, 0.f, 0.f); 00170 Pnt3f objpos(0.f, 0.f, 0.f); 00171 00172 Vec3f vDir; 00173 Vec3f n(0.f, 0.f, 1.f); 00174 00175 Quaternion q1; 00176 00177 mResult.invertFrom(mToWorld); 00178 00179 mToWorld.mult(n); 00180 00181 if(getAxisOfRotation() == Vec3f::Null) 00182 { 00183 if(_sfFocusOnCamera.getValue() == true) 00184 { 00185 Vec3f vUp; 00186 Vec3f uW; 00187 Vec3f vX; 00188 00189 camToWorld.mult(eyepos); 00190 mToWorld .mult(objpos); 00191 00192 vDir = eyepos - objpos; 00193 00194 vUp.setValue (camToWorld[0]); 00195 00196 vUp = vDir.cross(vUp); 00197 00198 vUp.normalize(); 00199 vDir.normalize(); 00200 00201 Matrix mTr; 00202 00203 vX = vUp.cross(vDir); 00204 vX.normalize(); 00205 00206 mTr[0][0] = vX[0]; 00207 mTr[0][1] = vX[1]; 00208 mTr[0][2] = vX[2]; 00209 mTr[1][0] = vUp[0]; 00210 mTr[1][1] = vUp[1]; 00211 mTr[1][2] = vUp[2]; 00212 mTr[2][0] = vDir[0]; 00213 mTr[2][1] = vDir[1]; 00214 mTr[2][2] = vDir[2]; 00215 00216 q1.setValue(mTr); 00217 } 00218 else 00219 { 00220 if(_sfAlignToScreen.getValue() == false) 00221 { 00222 Vec3f u (0.f, 1.f, 0.f); 00223 Vec3f vUp; 00224 Vec3f uW; 00225 00226 camToWorld.mult(eyepos); 00227 mToWorld .mult(objpos); 00228 00229 vDir = eyepos - objpos; 00230 00231 // vDir.setValue(camToWorld[2]); 00232 00233 vUp.setValue (camToWorld[1]); 00234 00235 Quaternion qN(n, vDir); 00236 00237 mToWorld.mult(u); 00238 00239 qN.multVec(u, uW); 00240 00241 q1.setValue(uW, vUp); 00242 00243 q1.mult(qN); 00244 } 00245 else 00246 { 00247 Vec3f u (0.f, 1.f, 0.f); 00248 Vec3f vUp; 00249 Vec3f uW; 00250 00251 vDir.setValue(camToWorld[2]); 00252 00253 vUp.setValue (camToWorld[1]); 00254 00255 Quaternion qN(n, vDir); 00256 00257 mToWorld.mult(u); 00258 00259 qN.multVec(u, uW); 00260 00261 q1.setValue(uW, vUp); 00262 00263 q1.mult(qN); 00264 } 00265 } 00266 } 00267 else 00268 { 00269 Vec3f wUp; 00270 Vec3f s; 00271 Vec3f tDir; 00272 00273 camToWorld.mult(eyepos); 00274 00275 mToWorld.mult(objpos); 00276 00277 mToWorld.mult(getAxisOfRotation(), wUp); 00278 00279 vDir = eyepos - objpos; 00280 00281 s = vDir.cross(wUp); 00282 tDir = wUp .cross(s ); 00283 00284 q1.setValue(n, tDir); 00285 00286 // clamp angle to [min; max] 00287 Vec3f axis; 00288 Real32 angle; 00289 00290 if(getMinAngle() <= getMaxAngle()) 00291 { 00292 q1.getValueAsAxisRad(axis, angle); 00293 00294 if(angle < getMinAngle()) 00295 angle = getMinAngle(); 00296 00297 if(angle > getMaxAngle()) 00298 angle = getMaxAngle(); 00299 00300 q1.setValueAsAxisRad(axis, angle); 00301 } 00302 } 00303 00304 Matrix mTrans; 00305 Matrix mMat; 00306 00307 mTrans[3][0] = mToWorld[3][0]; 00308 mTrans[3][1] = mToWorld[3][1]; 00309 mTrans[3][2] = mToWorld[3][2]; 00310 00311 mMat.setTransform(q1); 00312 00313 mResult.mult(mTrans); 00314 mResult.mult(mMat ); 00315 00316 mTrans[3][0] = -mToWorld[3][0]; 00317 mTrans[3][1] = -mToWorld[3][1]; 00318 mTrans[3][2] = -mToWorld[3][2]; 00319 00320 mResult.mult(mTrans); 00321 mResult.mult(mToWorld); 00322 00323 _camTransform = mResult; 00324 }
| void Billboard::dump | ( | UInt32 | uiIndent = 0, |
|
| const BitVector | bvFlags = 0 | |||
| ) | const [virtual] |
Reimplemented from OSG::Group.
Definition at line 129 of file OSGBillboard.cpp.
References OSG::Group::dump().
00131 { 00132 Inherited::dump(uiIndent, bvFlags); 00133 }
| void Billboard::accumulateMatrix | ( | Matrix & | result | ) | [protected, virtual] |
Reimplemented from OSG::NodeCore.
Definition at line 160 of file OSGBillboard.cpp.
References _camTransform, and OSG::TransformationMatrix< ValueTypeT >::mult().
00161 { 00162 result.mult(_camTransform); 00163 }
| void Billboard::adjustVolume | ( | Volume & | volume | ) | [protected, virtual] |
Reimplemented from OSG::NodeCore.
Definition at line 138 of file OSGBillboard.cpp.
References OSG::NodeCore::adjustVolume(), OSG::extend(), OSG::Volume::extendBy(), OSG::Volume::getBounds(), OSG::PointInterface< ValueTypeT, StorageInterfaceT >::maxValue(), and OSG::Sqrt2.
00139 { 00140 Inherited::adjustVolume(volume); 00141 00142 // enlarge the volume to adjust for rotations 00143 // keep the center, but make it a cube big enough to contain the 00144 // billboard in all orientations 00145 00146 Pnt3f min, max; 00147 00148 volume.getBounds(min, max); 00149 00150 Vec3f dia = max - min; 00151 Pnt3f center = min + dia * .5; 00152 Real32 extend = dia.maxValue(); 00153 00154 dia.setValues(extend * Sqrt2, extend * Sqrt2, extend * Sqrt2); 00155 00156 volume.extendBy( center - dia ); 00157 volume.extendBy( center + dia ); 00158 }
| ActionBase::ResultE OSG::Billboard::drawEnter | ( | Action * | action | ) | [protected] |
| ActionBase::ResultE OSG::Billboard::drawLeave | ( | Action * | action | ) | [protected] |
| ActionBase::ResultE Billboard::intersectEnter | ( | Action * | action | ) | [protected] |
Definition at line 330 of file OSGBillboard.cpp.
References _camTransform, OSG::ActionBase::Continue, OSG::Line::getDirection(), OSG::IntersectAction::getLine(), OSG::IntersectAction::getMaxDist(), OSG::Line::getPosition(), OSG::TransformationMatrix< ValueTypeT >::invert(), OSG::VectorInterface< ValueTypeT, StorageInterfaceT >::length(), OSG::TransformationMatrix< ValueTypeT >::multFullMatrixPnt(), OSG::TransformationMatrix< ValueTypeT >::multMatrixVec(), OSG::IntersectAction::scale(), and OSG::IntersectAction::setLine().
00331 { 00332 IntersectAction *ia = dynamic_cast<IntersectAction *>(action); 00333 Matrix m(_camTransform); 00334 00335 m.invert(); 00336