- Added geometryScale property to Body class.
- Removed old bitfield based render marks code from Body class.ver1_6_1
parent
0b545dd55a
commit
9d236c3b8e
|
@ -37,6 +37,7 @@ Body::Body(PlanetarySystem* _system, const string& _name) :
|
|||
albedo(0.5f),
|
||||
orientation(1.0f),
|
||||
geometry(InvalidResource),
|
||||
geometryScale(1.0f),
|
||||
surface(Color(1.0f, 1.0f, 1.0f)),
|
||||
atmosphere(NULL),
|
||||
rings(NULL),
|
||||
|
@ -44,7 +45,6 @@ Body::Body(PlanetarySystem* _system, const string& _name) :
|
|||
altSurfaces(NULL),
|
||||
locations(NULL),
|
||||
locationsComputed(false),
|
||||
refMarks(0),
|
||||
referenceMarks(NULL),
|
||||
visible(1),
|
||||
clickable(1),
|
||||
|
@ -388,17 +388,21 @@ void Body::setSurface(const Surface& surf)
|
|||
}
|
||||
|
||||
|
||||
ResourceHandle Body::getGeometry() const
|
||||
{
|
||||
return geometry;
|
||||
}
|
||||
|
||||
void Body::setGeometry(ResourceHandle _geometry)
|
||||
{
|
||||
geometry = _geometry;
|
||||
}
|
||||
|
||||
|
||||
/*! Set the scale factor for geometry; this is only used with unnormalized meshes.
|
||||
* When a mesh is normalized, the effective scale factor is the radius.
|
||||
*/
|
||||
void Body::setGeometryScale(float scale)
|
||||
{
|
||||
geometryScale = scale;
|
||||
}
|
||||
|
||||
|
||||
PlanetarySystem* Body::getSatellites() const
|
||||
{
|
||||
return satellites;
|
||||
|
@ -926,27 +930,6 @@ void Body::computeLocations()
|
|||
}
|
||||
|
||||
|
||||
bool
|
||||
Body::referenceMarkVisible(uint32 refmark) const
|
||||
{
|
||||
return (refMarks & refmark) != 0;
|
||||
}
|
||||
|
||||
|
||||
uint32
|
||||
Body::getVisibleReferenceMarks() const
|
||||
{
|
||||
return refMarks;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Body::setVisibleReferenceMarks(uint32 refmarks)
|
||||
{
|
||||
refMarks = refmarks;
|
||||
}
|
||||
|
||||
|
||||
/*! Add a new reference mark.
|
||||
*/
|
||||
void
|
||||
|
|
|
@ -230,8 +230,11 @@ class Body
|
|||
Atmosphere* getAtmosphere();
|
||||
void setAtmosphere(const Atmosphere&);
|
||||
|
||||
ResourceHandle getGeometry() const { return geometry; }
|
||||
void setGeometry(ResourceHandle);
|
||||
ResourceHandle getGeometry() const;
|
||||
float getGeometryScale() const { return geometryScale; }
|
||||
void setGeometryScale(float scale);
|
||||
|
||||
void setSurface(const Surface&);
|
||||
const Surface& getSurface() const;
|
||||
Surface& getSurface();
|
||||
|
@ -354,6 +357,7 @@ class Body
|
|||
float cullingRadius;
|
||||
|
||||
ResourceHandle geometry;
|
||||
float geometryScale;
|
||||
Surface surface;
|
||||
|
||||
Atmosphere* atmosphere;
|
||||
|
@ -369,7 +373,6 @@ class Body
|
|||
std::vector<Location*>* locations;
|
||||
mutable bool locationsComputed;
|
||||
|
||||
uint32 refMarks;
|
||||
std::list<ReferenceMark*>* referenceMarks;
|
||||
|
||||
Color orbitColor;
|
||||
|
|
Loading…
Reference in New Issue