BVB Source Codes

CRYENGINE Show ClusterRequest.cpp Source code

Return Download CRYENGINE: download ClusterRequest.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #include "StdAfx.h"
  4. #include "ClusterDetector.h"
  5.  
  6. ClusterRequest::ClusterRequest()
  7.         : m_state(eRequestState_Created)
  8.         , m_maxDistanceSq(FLT_MAX)
  9.         , m_totalClustersNumber(0)
  10. {
  11.         m_points.reserve(16);
  12. }
  13.  
  14. void ClusterRequest::SetNewPointInRequest(const uint32 pointId, const Vec3& location)
  15. {
  16.         m_points.push_back(ClusterPoint(pointId, location));
  17. }
  18.  
  19. size_t ClusterRequest::GetNumberOfPoint() const
  20. {
  21.         return m_points.size();
  22. }
  23.  
  24. void ClusterRequest::SetCallback(Callback callback)
  25. {
  26.         m_callback = callback;
  27. }
  28.  
  29. void ClusterRequest::SetMaximumSqDistanceAllowedPerCluster(float maxDistanceSq)
  30. {
  31.         m_maxDistanceSq = maxDistanceSq;
  32. }
  33.  
  34. const ClusterPoint* ClusterRequest::GetPointAt(const size_t pointIndex) const
  35. {
  36.         return (pointIndex < m_points.size()) ? &(m_points[pointIndex]) : NULL;
  37. }
  38.  
  39. size_t ClusterRequest::GetTotalClustersNumber() const
  40. {
  41.         return m_totalClustersNumber;
  42. }
  43.  
downloadClusterRequest.cpp Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top