OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CSVRender::Object Class Reference

#include <object.hpp>

Collaboration diagram for CSVRender::Object:

Public Types

enum  OverrideFlags { Override_Position = 1, Override_Rotation = 2, Override_Scale = 4 }
 

Public Member Functions

 Object (CSMWorld::Data &data, osg::Group *cellNode, const std::string &id, bool referenceable, bool forceBaseToZero=false)
 
 ~Object ()
 
void setSelected (bool selected)
 Mark the object as selected, selected objects show an outline effect. More...
 
bool getSelected () const
 
bool referenceableDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
bool referenceableAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
bool referenceDataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
std::string getReferenceId () const
 Returns an empty string if this is a refereceable-type object. More...
 
std::string getReferenceableId () const
 
osg::ref_ptr< TagBasegetTag () const
 
bool isEdited () const
 Is there currently an editing operation running on this object? More...
 
void setEdited (int flags)
 
ESM::Position getPosition () const
 
float getScale () const
 
void setPosition (const float position[3])
 Set override position. More...
 
void setRotation (const float rotation[3])
 Set override rotation. More...
 
void setScale (float scale)
 Set override scale. More...
 
void apply (CSMWorld::CommandMacro &commands)
 Apply override changes via command and end edit mode. More...
 
void setSubMode (int subMode)
 
void reset ()
 

Private Member Functions

 Object (const Object &)
 Not implemented. More...
 
Objectoperator= (const Object &)
 Not implemented. More...
 
void clear ()
 Remove object from node (includes deleting) More...
 
void update ()
 
void adjustTransform ()
 Adjust position, orientation and scale. More...
 
const CSMWorld::CellRefgetReference () const
 Throws an exception if *this was constructed with referenceable. More...
 
void updateMarker ()
 
osg::ref_ptr< osg::Node > makeMoveOrScaleMarker (int axis)
 
osg::ref_ptr< osg::Node > makeRotateMarker (int axis)
 
osg::Vec3f getMarkerPosition (float x, float y, float z, int axis)
 

Private Attributes

CSMWorld::DatamData
 
std::string mReferenceId
 
std::string mReferenceableId
 
osg::ref_ptr
< osg::PositionAttitudeTransform > 
mRootNode
 
osg::ref_ptr
< osg::PositionAttitudeTransform > 
mBaseNode
 
osg::ref_ptr< osgFX::Scribe > mOutline
 
bool mSelected
 
osg::Group * mParentNode
 
Resource::ResourceSystemmResourceSystem
 
bool mForceBaseToZero
 
ESM::Position mPositionOverride
 
float mScaleOverride
 
int mOverrideFlags
 
osg::ref_ptr< osg::Node > mMarker [3]
 
int mSubMode
 

Static Private Attributes

static const float MarkerShaftWidth = 30
 
static const float MarkerShaftBaseLength = 70
 
static const float MarkerHeadWidth = 50
 
static const float MarkerHeadLength = 50
 

Member Enumeration Documentation

Enumerator
Override_Position 
Override_Rotation 
Override_Scale 

Constructor & Destructor Documentation

CSVRender::Object::Object ( const Object )
private

Not implemented.

CSVRender::Object::Object ( CSMWorld::Data data,
osg::Group *  cellNode,
const std::string &  id,
bool  referenceable,
bool  forceBaseToZero = false 
)

Here is the call graph for this function:

CSVRender::Object::~Object ( )
Parameters
forceBaseToZeroIf this is a reference ignore the coordinates and place it at 0, 0, 0 instead.

Member Function Documentation

void CSVRender::Object::adjustTransform ( )
private

Adjust position, orientation and scale.

Here is the caller graph for this function:

void CSVRender::Object::apply ( CSMWorld::CommandMacro commands)

Apply override changes via command and end edit mode.

Todo:
figure out worldspace (not important until multiple worldspaces are supported)

Here is the call graph for this function:

void CSVRender::Object::clear ( )
private

Remove object from node (includes deleting)

osg::Vec3f CSVRender::Object::getMarkerPosition ( float  x,
float  y,
float  z,
int  axis 
)
private
ESM::Position CSVRender::Object::getPosition ( ) const
const CSMWorld::CellRef & CSVRender::Object::getReference ( ) const
private

Throws an exception if *this was constructed with referenceable.

Here is the caller graph for this function:

std::string CSVRender::Object::getReferenceableId ( ) const
std::string CSVRender::Object::getReferenceId ( ) const

Returns an empty string if this is a refereceable-type object.

float CSVRender::Object::getScale ( ) const
bool CSVRender::Object::getSelected ( ) const

Here is the caller graph for this function:

osg::ref_ptr< CSVRender::TagBase > CSVRender::Object::getTag ( ) const
bool CSVRender::Object::isEdited ( ) const

Is there currently an editing operation running on this object?

osg::ref_ptr< osg::Node > CSVRender::Object::makeMoveOrScaleMarker ( int  axis)
private
osg::ref_ptr< osg::Node > CSVRender::Object::makeRotateMarker ( int  axis)
private
Object& CSVRender::Object::operator= ( const Object )
private

Not implemented.

bool CSVRender::Object::referenceableAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
Returns
Did this call result in a modification of the visual representation of this object?

Here is the call graph for this function:

bool CSVRender::Object::referenceableDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
Returns
Did this call result in a modification of the visual representation of this object?

Here is the call graph for this function:

bool CSVRender::Object::referenceDataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
Returns
Did this call result in a modification of the visual representation of this object?

Here is the call graph for this function:

void CSVRender::Object::reset ( )

Erase all overrides and restore the visual representation of the object to its true state.

void CSVRender::Object::setEdited ( int  flags)
void CSVRender::Object::setPosition ( const float  position[3])

Set override position.

void CSVRender::Object::setRotation ( const float  rotation[3])

Set override rotation.

void CSVRender::Object::setScale ( float  scale)

Set override scale.

void CSVRender::Object::setSelected ( bool  selected)

Mark the object as selected, selected objects show an outline effect.

Here is the caller graph for this function:

void CSVRender::Object::setSubMode ( int  subMode)
void CSVRender::Object::update ( )
private

Update model

Note
Make sure adjustTransform() was called first so world space particles get positioned correctly
Todo:
check for Deleted state (error 1)

Here is the call graph for this function:

Here is the caller graph for this function:

void CSVRender::Object::updateMarker ( )
private

Here is the caller graph for this function:

Member Data Documentation

const float CSVRender::Object::MarkerHeadLength = 50
staticprivate
const float CSVRender::Object::MarkerHeadWidth = 50
staticprivate
const float CSVRender::Object::MarkerShaftBaseLength = 70
staticprivate
const float CSVRender::Object::MarkerShaftWidth = 30
staticprivate
osg::ref_ptr<osg::PositionAttitudeTransform> CSVRender::Object::mBaseNode
private
CSMWorld::Data& CSVRender::Object::mData
private
bool CSVRender::Object::mForceBaseToZero
private
osg::ref_ptr<osg::Node> CSVRender::Object::mMarker[3]
private
osg::ref_ptr<osgFX::Scribe> CSVRender::Object::mOutline
private
int CSVRender::Object::mOverrideFlags
private
osg::Group* CSVRender::Object::mParentNode
private
ESM::Position CSVRender::Object::mPositionOverride
private
std::string CSVRender::Object::mReferenceableId
private
std::string CSVRender::Object::mReferenceId
private
Resource::ResourceSystem* CSVRender::Object::mResourceSystem
private
osg::ref_ptr<osg::PositionAttitudeTransform> CSVRender::Object::mRootNode
private
float CSVRender::Object::mScaleOverride
private
bool CSVRender::Object::mSelected
private
int CSVRender::Object::mSubMode
private

The documentation for this class was generated from the following files: