Merged
https://svn.blender.org/svnroot/bf-blender/branches/soc-2008-mxcurioni (r22789) and https://svn.blender.org/svnroot/bf-blender/trunk/blender (r23338) with the "Ignore ancestry" and "Ignore line endings" options enabled (using TortoiseSVN on Windows). After the merge operation, all changes (i.e., deletion) in source/blender/freestyle/ were reverted in order to keep the primary source tree of the Freestyle renderer.
This commit is contained in:
@@ -40,22 +40,24 @@ SG_Spatial::
|
||||
SG_Spatial(
|
||||
void* clientobj,
|
||||
void* clientinfo,
|
||||
SG_Callbacks callbacks
|
||||
SG_Callbacks& callbacks
|
||||
):
|
||||
|
||||
SG_IObject(clientobj,clientinfo,callbacks),
|
||||
m_localPosition(MT_Point3(0.0,0.0,0.0)),
|
||||
m_localRotation(MT_Matrix3x3(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0)),
|
||||
m_localScaling(MT_Vector3(1.f,1.f,1.f)),
|
||||
m_localPosition(0.0,0.0,0.0),
|
||||
m_localRotation(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0),
|
||||
m_localScaling(1.f,1.f,1.f),
|
||||
|
||||
m_worldPosition(MT_Point3(0.0,0.0,0.0)),
|
||||
m_worldRotation(MT_Matrix3x3(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0)),
|
||||
m_worldScaling(MT_Vector3(1.f,1.f,1.f)),
|
||||
m_worldPosition(0.0,0.0,0.0),
|
||||
m_worldRotation(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0),
|
||||
m_worldScaling(1.f,1.f,1.f),
|
||||
|
||||
m_parent_relation (NULL),
|
||||
|
||||
m_bbox(MT_Point3(-1.0, -1.0, -1.0), MT_Point3(1.0, 1.0, 1.0)),
|
||||
m_radius(1.0)
|
||||
m_radius(1.0),
|
||||
m_modified(false),
|
||||
m_ogldirty(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -75,7 +77,9 @@ SG_Spatial(
|
||||
m_parent_relation(NULL),
|
||||
|
||||
m_bbox(other.m_bbox),
|
||||
m_radius(other.m_radius)
|
||||
m_radius(other.m_radius),
|
||||
m_modified(false),
|
||||
m_ogldirty(false)
|
||||
{
|
||||
// duplicate the parent relation for this object
|
||||
m_parent_relation = other.m_parent_relation->NewCopy();
|
||||
@@ -87,13 +91,6 @@ SG_Spatial::
|
||||
delete (m_parent_relation);
|
||||
}
|
||||
|
||||
SG_ParentRelation *
|
||||
SG_Spatial::
|
||||
GetParentRelation(
|
||||
){
|
||||
return m_parent_relation;
|
||||
}
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
SetParentRelation(
|
||||
@@ -101,6 +98,7 @@ SetParentRelation(
|
||||
){
|
||||
delete (m_parent_relation);
|
||||
m_parent_relation = relation;
|
||||
SetModified();
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +112,8 @@ SetParentRelation(
|
||||
SG_Spatial::
|
||||
UpdateSpatialData(
|
||||
const SG_Spatial *parent,
|
||||
double time
|
||||
double time,
|
||||
bool& parentUpdated
|
||||
){
|
||||
|
||||
bool bComputesWorldTransform = false;
|
||||
@@ -135,16 +134,11 @@ UpdateSpatialData(
|
||||
// our world coordinates.
|
||||
|
||||
if (!bComputesWorldTransform)
|
||||
bComputesWorldTransform = ComputeWorldTransforms(parent);
|
||||
bComputesWorldTransform = ComputeWorldTransforms(parent, parentUpdated);
|
||||
|
||||
return bComputesWorldTransform;
|
||||
}
|
||||
|
||||
bool SG_Spatial::ComputeWorldTransforms(const SG_Spatial *parent)
|
||||
{
|
||||
return m_parent_relation->UpdateChildCoordinates(this,parent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Position and translation methods
|
||||
*/
|
||||
@@ -166,52 +160,14 @@ RelativeTranslate(
|
||||
m_localPosition += trans;
|
||||
}
|
||||
}
|
||||
SetModified();
|
||||
}
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
SetLocalPosition(
|
||||
const MT_Point3& trans
|
||||
){
|
||||
m_localPosition = trans;
|
||||
}
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
SetWorldPosition(
|
||||
const MT_Point3& trans
|
||||
) {
|
||||
m_worldPosition = trans;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scaling methods.
|
||||
*/
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
RelativeScale(
|
||||
const MT_Vector3& scale
|
||||
){
|
||||
m_localScaling = m_localScaling * scale;
|
||||
}
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
SetLocalScale(
|
||||
const MT_Vector3& scale
|
||||
){
|
||||
m_localScaling = scale;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
SetWorldScale(
|
||||
const MT_Vector3& scale
|
||||
){
|
||||
m_worldScaling = scale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Orientation and rotation methods.
|
||||
@@ -229,84 +185,11 @@ RelativeRotate(
|
||||
rot
|
||||
:
|
||||
(GetWorldOrientation().inverse() * rot * GetWorldOrientation()));
|
||||
}
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
SetLocalOrientation(const MT_Matrix3x3& rot)
|
||||
{
|
||||
m_localRotation = rot;
|
||||
SetModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
SG_Spatial::
|
||||
SetWorldOrientation(
|
||||
const MT_Matrix3x3& rot
|
||||
) {
|
||||
m_worldRotation = rot;
|
||||
}
|
||||
|
||||
const
|
||||
MT_Point3&
|
||||
SG_Spatial::
|
||||
GetLocalPosition(
|
||||
) const {
|
||||
return m_localPosition;
|
||||
}
|
||||
|
||||
const
|
||||
MT_Matrix3x3&
|
||||
SG_Spatial::
|
||||
GetLocalOrientation(
|
||||
) const {
|
||||
return m_localRotation;
|
||||
}
|
||||
|
||||
const
|
||||
MT_Vector3&
|
||||
SG_Spatial::
|
||||
GetLocalScale(
|
||||
) const{
|
||||
return m_localScaling;
|
||||
}
|
||||
|
||||
|
||||
const
|
||||
MT_Point3&
|
||||
SG_Spatial::
|
||||
GetWorldPosition(
|
||||
) const {
|
||||
return m_worldPosition;
|
||||
}
|
||||
|
||||
const
|
||||
MT_Matrix3x3&
|
||||
SG_Spatial::
|
||||
GetWorldOrientation(
|
||||
) const {
|
||||
return m_worldRotation;
|
||||
}
|
||||
|
||||
const
|
||||
MT_Vector3&
|
||||
SG_Spatial::
|
||||
GetWorldScaling(
|
||||
) const {
|
||||
return m_worldScaling;
|
||||
}
|
||||
|
||||
SG_BBox& SG_Spatial::BBox()
|
||||
{
|
||||
return m_bbox;
|
||||
}
|
||||
|
||||
void SG_Spatial::SetBBox(SG_BBox& bbox)
|
||||
{
|
||||
m_bbox = bbox;
|
||||
}
|
||||
|
||||
MT_Transform SG_Spatial::GetWorldTransform() const
|
||||
{
|
||||
return MT_Transform(m_worldPosition,
|
||||
|
||||
Reference in New Issue
Block a user