![]() |
An open-source, flexible 3D physical simulation framework
|
#include <TerrainDrawObject.h>
Public Member Functions | |
TerrainDrawObject (GraphicsManager *g, const mars::interfaces::terrainStruct *ts, std::string gridFile="") | |
virtual | ~TerrainDrawObject (void) |
virtual void | generateTangents () |
virtual void | collideSphere (mars::utils::Vector pos, mars::interfaces::sReal radius) |
void | createObject (unsigned long id, const utils::Vector &pivot, unsigned long sharedID) |
void | setData (configmaps::ConfigMap map) |
![]() | |
DrawObject (GraphicsManager *g) | |
virtual | ~DrawObject () |
void | setStateFilename (const std::string &filename, int create) |
void | exportState (void) |
void | exportModel (const std::string &filename) |
virtual void | setMaterial (const std::string &name) |
virtual void | setPosition (const mars::utils::Vector &_pos) |
virtual void | setQuaternion (const mars::utils::Quaternion &_q) |
virtual const mars::utils::Vector & | getPosition () |
virtual const mars::utils::Quaternion & | getQuaternion () |
virtual void | setScaledSize (const mars::utils::Vector &scaledSize) |
void | setScale (const mars::utils::Vector &scale) |
void | removeBits (unsigned int bits) |
void | setBits (unsigned int bits) |
void | setNodeMask (unsigned int mask) |
void | setBrightness (double v) |
void | setRenderBinNumber (int number) |
bool | containsNode (osg::Node *node) |
virtual void | setSelected (bool val) |
bool | isSelected (void) |
void | setSelectable (bool val) |
void | setShowSelected (bool val) |
unsigned long | getID (void) const |
void | setID (unsigned long _id) |
void | showNormals (bool val) |
osg::ref_ptr< osg::PositionAttitudeTransform > | getTransform () |
osg::ref_ptr< osg::MatrixTransform > | getScaleMatrix () |
osg::Group * | getObject (void) const |
osg::PositionAttitudeTransform * | getPosTransform (void) const |
osg::MatrixTransform * | getScaleTransform (void) const |
void | setExperimentalLineLaser (utils::Vector lineLasePos, utils::Vector lineLaserNormal, utils::Vector lineLaserColor, utils::Vector LaserAngle, float openingAngle) |
Sets the line laser : position of the laser : normalvector of the laser-plane : color of the laser in RGB : Angle of the laser, as an direction-vector : Opening angle of the laser; for complete laserLine, choose PI. More... | |
void | setMaxNumLights (int n) |
void | show () |
void | hide () |
osg_material_manager::MaterialNode * | getStateGroup () |
void | addLODGeodes (std::list< osg::ref_ptr< osg::Geode > > geodes, float start, float end) |
void | seperateMaterial () |
void | addSelectionChild (DrawObject *c) |
Static Public Attributes | |
static int | countSubTiles = 0 |
![]() | |
static osg::ref_ptr< osg::Material > | selectionMaterial = makeSelectionMaterial() |
Private Member Functions | |
virtual std::list< osg::ref_ptr< osg::Geode > > | createGeometry () |
void | createNewSubTile (SubTile *newSubTile, mars::utils::Vector pos, double radius) |
mars::utils::Vector | getNormal (int x, int y, int mx, int my, double x_step, double y_step, double **height_data, osg::Vec3d *t, bool skipBorder=false) |
int | rectangleIntersect (const osg::Vec3 &first_leftup, const osg::Vec3 &first_downright, const osg::Vec3 &second_leftup, const osg::Vec3 &second_downright) |
osg::Vec3d | intersectReplacementSphere (osg::Vec3 center, double radius, osg::Vec3 vertex) |
void | cutHole (int x1, int x2, int y1, int y2) |
bool | adaptSubtile (SubTile *tile, mars::utils::Vector pos, double radius) |
void | removeSubTile (SubTile *tile) |
void | updateShadowObject (mars::utils::Vector pos) |
void | drawSubTile (SubTile *tile) |
double | getHeight (int x, int y, SubTile *tile) |
Private Attributes | |
mars::interfaces::terrainStruct | info |
osg::ref_ptr< osg::Vec4Array > | tangents |
osg::ref_ptr< osg::Geometry > | geom |
osg::ref_ptr< osg::Vec3Array > | vertices |
osg::ref_ptr< osg::Vec2Array > | texcoords |
osg::ref_ptr< osg::Vec3Array > | normals |
osg::ref_ptr< osg::Vec3Array > | normal_debug |
osg::ref_ptr< osg::Geometry > | normal_geom |
double ** | height_data |
int | tangentUnit |
int | num_y |
int | num_x |
double | x_step |
double | y_step |
double | x_step2 |
double | y_step2 |
double | tex_scale_x |
double | tex_scale_y |
std::string | gridFile |
std::vector< std::vector< LoadDrawObjectPSetBox * > * > | gridPSets |
std::map< int, SubTile * > | subTiles |
std::vector< SubTile * > | vSubTiles |
configmaps::ConfigMap | map |
Additional Inherited Members | |
![]() | |
unsigned long | id_ |
unsigned int | nodeMask_ |
std::string | stateFilename_ |
bool | selected_ |
bool | selectable_ |
bool | showSelected |
osg::ref_ptr< osg_material_manager::MaterialNode > | materialNode |
osg::ref_ptr< osg::Group > | group_ |
std::list< osg::ref_ptr< osg::Geometry > > | geometry_ |
osg::ref_ptr< osg::Geode > | normal_geode |
osg::ref_ptr< osg::LOD > | lod |
osg::ref_ptr< osg::PositionAttitudeTransform > | posTransform_ |
osg::ref_ptr< osg::MatrixTransform > | scaleTransform_ |
std::vector< DrawObject * > | selectionChilds |
mars::utils::Vector | position_ |
mars::utils::Vector | pivot_ |
mars::utils::Vector | geometrySize_ |
mars::utils::Vector | scaledSize_ |
mars::utils::Quaternion | quaternion_ |
osg::ref_ptr< osg::Program > | selectShader |
int | maxNumLights |
bool | sharedStateGroup |
bool | isHidden |
double | brightness |
GraphicsManager * | g |
Definition at line 84 of file TerrainDrawObject.h.
mars::graphics::TerrainDrawObject::TerrainDrawObject | ( | GraphicsManager * | g, |
const mars::interfaces::terrainStruct * | ts, | ||
std::string | gridFile = "" |
||
) |
Definition at line 57 of file TerrainDrawObject.cpp.
|
virtual |
Definition at line 75 of file TerrainDrawObject.cpp.
|
private |
Definition at line 954 of file TerrainDrawObject.cpp.
|
virtual |
Reimplemented from mars::graphics::DrawObject.
Definition at line 437 of file TerrainDrawObject.cpp.
|
privatevirtual |
Implements mars::graphics::DrawObject.
Definition at line 133 of file TerrainDrawObject.cpp.
|
private |
Definition at line 606 of file TerrainDrawObject.cpp.
|
virtual |
Reimplemented from mars::graphics::DrawObject.
Definition at line 90 of file TerrainDrawObject.cpp.
|
private |
Definition at line 844 of file TerrainDrawObject.cpp.
|
private |
Definition at line 1082 of file TerrainDrawObject.cpp.
|
virtual |
Definition at line 422 of file TerrainDrawObject.cpp.
|
private |
Definition at line 1097 of file TerrainDrawObject.cpp.
|
private |
Definition at line 743 of file TerrainDrawObject.cpp.
|
private |
Definition at line 835 of file TerrainDrawObject.cpp.
|
private |
Definition at line 918 of file TerrainDrawObject.cpp.
|
private |
Definition at line 1121 of file TerrainDrawObject.cpp.
void mars::graphics::TerrainDrawObject::setData | ( | configmaps::ConfigMap | map | ) |
Definition at line 83 of file TerrainDrawObject.cpp.
|
private |
Definition at line 1245 of file TerrainDrawObject.cpp.
|
static |
Definition at line 94 of file TerrainDrawObject.h.
|
private |
Definition at line 111 of file TerrainDrawObject.h.
|
private |
Definition at line 126 of file TerrainDrawObject.h.
|
private |
Definition at line 127 of file TerrainDrawObject.h.
|
private |
Definition at line 119 of file TerrainDrawObject.h.
|
private |
Definition at line 109 of file TerrainDrawObject.h.
|
private |
Definition at line 132 of file TerrainDrawObject.h.
|
private |
Definition at line 116 of file TerrainDrawObject.h.
|
private |
Definition at line 117 of file TerrainDrawObject.h.
|
private |
Definition at line 115 of file TerrainDrawObject.h.
|
private |
Definition at line 122 of file TerrainDrawObject.h.
|
private |
Definition at line 122 of file TerrainDrawObject.h.
|
private |
Definition at line 130 of file TerrainDrawObject.h.
|
private |
Definition at line 110 of file TerrainDrawObject.h.
|
private |
Definition at line 121 of file TerrainDrawObject.h.
|
private |
Definition at line 125 of file TerrainDrawObject.h.
|
private |
Definition at line 125 of file TerrainDrawObject.h.
|
private |
Definition at line 114 of file TerrainDrawObject.h.
|
private |
Definition at line 113 of file TerrainDrawObject.h.
|
private |
Definition at line 131 of file TerrainDrawObject.h.
|
private |
Definition at line 123 of file TerrainDrawObject.h.
|
private |
Definition at line 124 of file TerrainDrawObject.h.
|
private |
Definition at line 123 of file TerrainDrawObject.h.
|
private |
Definition at line 124 of file TerrainDrawObject.h.