#include <attrbev.h>
Inheritance diagram for AttrBevelLightAngle:
Public Member Functions | |
AttrBevelLightAngle () | |
Default constructor for Line Width Attribute class. | |
AttrBevelLightAngle (Node *ContextNode, AttachNodeDirection Direction, BOOL Locked=FALSE, BOOL Mangled=FALSE, BOOL Marked=FALSE, BOOL Selected=FALSE) | |
Creates a bValue Attribute. | |
virtual CCRuntimeClass * | GetAttributeType () |
virtual AttributeValue * | GetAttributeValue () |
virtual AttrIndex | GetAttributeIndex () |
void | Render (RenderRegion *pRender) |
'Renders' a Line Width attribute. | |
Node * | SimpleCopy () |
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes. | |
virtual INT32 | operator== (const NodeAttribute &NodeAttrib) |
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required. | |
virtual UINT32 | GetAttrNameID (void) |
Returns back a string resource ID describing the attribute. | |
void | ShowDebugTreeDetails () const |
Displays debugging info of the tree. | |
void | GetDebugDetails (StringBase *Str) |
For obtaining debug information about the Node. | |
virtual UINT32 | GetNodeSize () const |
For finding the size of the node. | |
virtual void | Transform (TransformBase &) |
Scale the Line Width. | |
virtual BOOL | EffectsParentBounds () |
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads. | |
virtual BOOL | WritePreChildrenWeb (BaseCamelotFilter *pFilter) |
Writes the line width record to the filter. | |
virtual BOOL | WritePreChildrenNative (BaseCamelotFilter *pFilter) |
void | SetValue (INT32 NewValue) |
BOOL | Blend (BlendAttrParam *pBlendParam) |
Blends this light angle to another. | |
virtual void | PolyCopyNodeContents (NodeRenderable *pNodeCopy) |
Polymorphically copies the contents of this node to another. | |
Public Attributes | |
BevelAttributeValueLightAngle | Value |
Private Member Functions | |
void | CopyNodeContents (AttrBevelLightAngle *NodeCopy) |
This method copies the node's contents to the node pointed to by NodeCopy. |
Definition at line 266 of file attrbev.h.
|
Default constructor for Line Width Attribute class.
Definition at line 2023 of file attrbev.cpp.
|
|
Creates a bValue Attribute.
Definition at line 1998 of file attrbev.cpp. 02004 : AttrBevel(ContextNode, Direction, Locked, Mangled, Marked, Selected) 02005 { 02006 }
|
|
Blends this light angle to another.
Reimplemented from NodeAttribute. Definition at line 2220 of file attrbev.cpp. 02221 { 02222 ERROR2IF(pBlendParam == NULL,FALSE,"pBlendParam == NULL"); 02223 ERROR3IF(!(pBlendParam->GetOtherAttr()->IS_KIND_OF(AttrBevelLightAngle)), 02224 "Blend attribute isn't a bevel light angle attribute"); 02225 02226 AttrBevelLightAngle * pBlendedAttr = NULL; 02227 02228 // assign the other attribute we're looking at 02229 AttrBevelLightAngle * pOtherAttr = (AttrBevelLightAngle *)pBlendParam->GetOtherAttr(); 02230 02231 // split at the half way mark 02232 if (pBlendParam->GetBlendRatio() <= 0.5) 02233 { 02234 pBlendedAttr = (AttrBevelLightAngle *)SimpleCopy(); 02235 } 02236 else 02237 { 02238 pBlendedAttr = (AttrBevelLightAngle *)pOtherAttr->SimpleCopy(); 02239 } 02240 02241 // set the blended attribute 02242 pBlendParam->SetBlendedAttr(pBlendedAttr); 02243 02244 if (!pBlendedAttr) 02245 return FALSE; 02246 02247 double LightAngle1 = Value.m_LightAngle; 02248 double LightAngle2 = pOtherAttr->Value.m_LightAngle; 02249 02250 // make both light angles between 0 and 360 02251 while (LightAngle1 >= 360) 02252 LightAngle1 -= 360; 02253 02254 while (LightAngle1 < 0) 02255 LightAngle1 += 360; 02256 02257 while (LightAngle2 >= 360) 02258 LightAngle2 -= 360; 02259 02260 while (LightAngle2 < 0) 02261 LightAngle2 += 360; 02262 02263 // check the difference between the two 02264 if (fabs(LightAngle2 - LightAngle1) > 180.0) 02265 { 02266 // choose the smallest difference 02267 if (LightAngle2 > LightAngle1) 02268 { 02269 LightAngle1 += 360.0; 02270 } 02271 else 02272 { 02273 LightAngle2 += 360.0; 02274 } 02275 } 02276 02277 double NewLightAngle = ((LightAngle2 - LightAngle1) * pBlendParam->GetBlendRatio()) + 02278 LightAngle1; 02279 02280 pBlendedAttr->Value.m_LightAngle = (INT32)NewLightAngle; 02281 02282 return TRUE; 02283 }
|
|
This method copies the node's contents to the node pointed to by NodeCopy.
Definition at line 2160 of file attrbev.cpp. 02161 { 02162 NodeAttribute::CopyNodeContents( NodeCopy ); 02163 02164 NodeCopy->Value = Value; 02165 }
|
|
Virtual function for determining if the node will effect it's parent bounds. eg. ArrowHeads.
Reimplemented from NodeAttribute. Definition at line 296 of file attrbev.h. 00296 { return FALSE; }
|
|
Reimplemented from NodeAttribute. Definition at line 281 of file attrbev.h. 00281 { return ATTR_BEVELLIGHTANGLE; }
|
|
Reimplemented from NodeAttribute. Definition at line 279 of file attrbev.h. 00279 { return CC_RUNTIME_CLASS(AttrBevelLightAngle); }
|
|
Reimplemented from NodeAttribute. Definition at line 280 of file attrbev.h. 00280 { return &Value; }
|
|
Returns back a string resource ID describing the attribute.
Reimplemented from NodeAttribute. Definition at line 2136 of file attrbev.cpp. 02137 { 02138 return (_R(IDS_BEVEL_LIGHTANGLE_ID)); 02139 }
|
|
For obtaining debug information about the Node.
Reimplemented from NodeRenderable. Definition at line 2287 of file attrbev.cpp. 02288 { 02289 #ifdef _DEBUG 02290 if (Str) 02291 { 02292 NodeAttribute::GetDebugDetails( Str ); 02293 String_256 TempStr; 02294 TempStr._MakeMsg( TEXT("\r\nValue=#1%d\r\n"), Value.m_LightAngle ); 02295 (*Str) += TempStr; 02296 } 02297 #else 02298 if (Str) 02299 { 02300 *Str = wxT(""); 02301 } 02302 #endif 02303 }
|
|
For finding the size of the node.
Reimplemented from Node. Definition at line 2321 of file attrbev.cpp. 02322 { 02323 return (sizeof(AttrBevelLightAngle)); 02324 }
|
|
A virtual comparison operator. See NodeAttribute::operator== for a description of why it's required.
Reimplemented from NodeAttribute. Definition at line 2111 of file attrbev.cpp. 02112 { 02113 ENSURE(Attrib.IsKindOf(CC_RUNTIME_CLASS(AttrBevelLightAngle)), 02114 "Trying to compare two objects with different types"); 02115 AttrBevelLightAngle * Attr = (AttrBevelLightAngle *) &Attrib; 02116 return (Attr->Value.m_LightAngle == Value.m_LightAngle); 02117 }
|
|
Polymorphically copies the contents of this node to another.
Reimplemented from NodeRenderable. Definition at line 2179 of file attrbev.cpp. 02180 { 02181 ENSURE(pNodeCopy, "Trying to copy a node's contents into a NULL node"); 02182 ENSURE(IS_A(pNodeCopy, AttrBevelLightAngle), "PolyCopyNodeContents given wrong dest node type"); 02183 02184 if (IS_A(pNodeCopy, AttrBevelLightAngle)) 02185 CopyNodeContents((AttrBevelLightAngle*)pNodeCopy); 02186 }
|
|
'Renders' a Line Width attribute.
Reimplemented from NodeAttribute. Definition at line 2043 of file attrbev.cpp.
|
|
Definition at line 302 of file attrbev.h. 00302 { Value.m_LightAngle = NewValue; }
|
|
Displays debugging info of the tree.
Definition at line 2200 of file attrbev.cpp. 02201 { 02202 // Display a bit of debugging info 02203 // For now, we will just call the base class version 02204 #ifdef _DEBUG 02205 NodeAttribute::ShowDebugTreeDetails(); 02206 #endif 02207 }
|
|
This method returns a shallow copy of the node with all Node pointers NULL. The function is virtual, and must be defined for all derived classes.
Reimplemented from NodeAttribute. Definition at line 2083 of file attrbev.cpp. 02084 { 02085 AttrBevelLightAngle* NodeCopy = new AttrBevelLightAngle(); 02086 ERRORIF(NodeCopy == NULL, _R(IDE_NOMORE_MEMORY), NULL); 02087 CopyNodeContents(NodeCopy); 02088 NodeCopy->Value.m_LightAngle = Value.m_LightAngle; 02089 return NodeCopy; 02090 }
|
|
Scale the Line Width.
Reimplemented from NodeRenderable. Definition at line 2059 of file attrbev.cpp.
|
|
Reimplemented from Node. Definition at line 2347 of file attrbev.cpp. 02348 { 02349 #ifdef DO_EXPORT 02350 return WritePreChildrenWeb(pFilter); 02351 #else 02352 return FALSE; 02353 #endif 02354 }
|
|
Writes the line width record to the filter. > virtual BOOL AttrBevelLightAngle::WritePreChildrenWeb(BaseCamelotFilter* pFilter)
Reimplemented from Node. Definition at line 2339 of file attrbev.cpp. 02340 { 02341 return TRUE; 02342 }
|
|
|