OBBCenter()

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Icon-callout-orphan.png
This article is an orphan, meaning that few or no articles link to it (since January 2024). You can help by adding links to this article from other relevant articles.

Returns the center of the collision hull. This is also used for CBaseEntity::WorldSpaceCenter() and CBaseEntity::BodyTarget().

source-sdk-2013/src/game/shared/collisionproperty.cpp
C
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
inline const Vector& CCollisionProperty::OBBCenter( ) const { Vector &vecResult = AllocTempVector(); VectorLerp( m_vecMins, m_vecMaxs, 0.5f, vecResult ); return vecResult; }
OBBCenter( )
Returns a local vector of the centre of a Bounding Box, VectorLerp() interpolates a line between mins and max and returns the half way point.

Used in


This article or section is a stub. You can help by expanding it.