|
From: <ma...@us...> - 2002-08-30 19:13:43
|
Update of /cvsroot/decaldev/source/DecalFilters
In directory usw-pr-cvs1:/tmp/cvs-serv23029
Modified Files:
DecalFilters.idl WorldObject.cpp WorldObject.h
Log Message:
Add RawCoordinates property to WorldObject, for those who roll their own distance stuff
Index: DecalFilters.idl
===================================================================
RCS file: /cvsroot/decaldev/source/DecalFilters/DecalFilters.idl,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** DecalFilters.idl 21 Aug 2002 19:49:14 -0000 1.26
--- DecalFilters.idl 30 Aug 2002 19:13:40 -0000 1.27
***************
*** 509,512 ****
--- 509,513 ----
[propget, id(34), helpstring("property ApproachDistance")] HRESULT ApproachDistance([out, retval] float *pVal);
[propget, id(35), helpstring("property SecondaryName")] HRESULT SecondaryName([out, retval] BSTR *pVal);
+ [propget, id(36), helpstring("property RawCoordinates")] HRESULT RawCoordinates([in, out] float *pX, [in, out] float *pY, float *pZ, [out, retval] VARIANT_BOOL *pVal);
};
Index: WorldObject.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/DecalFilters/WorldObject.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** WorldObject.cpp 29 Jul 2002 02:41:26 -0000 1.19
--- WorldObject.cpp 30 Aug 2002 19:13:40 -0000 1.20
***************
*** 264,267 ****
--- 264,291 ----
}
+ // Exposes the raw coordinate data as sent by the server, for those who prefer to do their own calcs.
+ STDMETHODIMP cWorldObject::get_RawCoordinates(float *pX, float *pY, float *pZ, VARIANT_BOOL *pVal)
+ {
+ if (pX==NULL || pY==NULL ) {
+ _ASSERT(FALSE);
+ if (pVal) *pVal = VARIANT_FALSE ;
+ return E_POINTER ;
+ }
+
+ *pX = m_p->m_fxOffset;
+ *pY = m_p->m_fyOffset;
+
+ if (pZ)
+ {
+ *pZ = m_p->m_fzOffset;
+ }
+
+ if (pVal)
+ {
+ *pVal = VARIANT_TRUE ;
+ }
+
+ return S_OK ;
+ }
STDMETHODIMP cWorldObject::get_Flags(long *pVal)
Index: WorldObject.h
===================================================================
RCS file: /cvsroot/decaldev/source/DecalFilters/WorldObject.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** WorldObject.h 29 Jul 2002 02:41:26 -0000 1.15
--- WorldObject.h 30 Aug 2002 19:13:40 -0000 1.16
***************
*** 45,48 ****
--- 45,49 ----
// IWorldObject
STDMETHOD(get_Coordinates)(/*[in, out]*/ float *NorthSouth, /*[in, out]*/ float *EastWest, /*[out, retval]*/ VARIANT_BOOL *pVal);
+ STDMETHOD(get_RawCoordinates)(/*[in, out]*/ float *pX, /*[in, out]*/ float *pY, /*[in, out]*/ float *pZ, /*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_Distance)(float *NorthSouth, float *EastWest, /*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_WieldingSlot)(/*[out, retval]*/ long *pVal);
|