4 #include <zerobuf/ConstAllocator.h> 5 #include <zerobuf/Vector.h> 6 #include <zerobuf/Zerobuf.h> 18 typedef std::unique_ptr< const Plane > ConstPlanePtr;
20 class Plane :
public ::zerobuf::Zerobuf
31 std::vector< float > getNormalVector()
const;
45 void setNormal(
const std::vector< float >& value );
46 size_t getNormalSize()
const;
55 void setD(
float value );
58 Plane(
const std::vector< float >& normalValue,
const float& dValue );
61 Plane( const ::zerobuf::Zerobuf& rhs );
62 explicit Plane( ::zerobuf::AllocatorPtr allocator );
64 Plane& operator = (
const Plane& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs );
return *
this; }
68 std::string getSchema()
const final;
69 static std::string ZEROBUF_SCHEMA();
70 std::string getTypeName()
const final {
return "lexis::render::detail::Plane"; }
71 static std::string ZEROBUF_TYPE_NAME() {
return "lexis::render::detail::Plane"; }
72 ::zerobuf::uint128_t getTypeIdentifier()
const final { return ::zerobuf::uint128_t( 0xc3abd51a5b96213eull, 0x22e87411a3d83d55ull ); }
73 static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0xc3abd51a5b96213eull, 0x22e87411a3d83d55ull ); }
74 size_t getZerobufStaticSize()
const final {
return 20; }
75 static size_t ZEROBUF_STATIC_SIZE() {
return 20; }
76 size_t getZerobufNumDynamics()
const final {
return 0; }
77 static size_t ZEROBUF_NUM_DYNAMICS() {
return 0; }
78 static ConstPlanePtr create(
const void* data,
const size_t size ) {
return ConstPlanePtr(
new Plane( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
80 void _parseJSON(
const Json::Value& json )
final;
81 void _createJSON( Json::Value& json )
const final;
85 typedef std::unique_ptr< const ClipPlanes > ConstClipPlanesPtr;
90 typedef ::zerobuf::Vector< Plane > Planes;
97 ClipPlanes::Planes& getPlanes();
98 const ClipPlanes::Planes& getPlanes()
const;
99 std::vector< Plane > getPlanesVector()
const;
106 void setPlanes(
const std::vector< Plane >& value );
108 void compact(
float threshold = 0.1f )
final;
110 ClipPlanes(
const std::vector< Plane >& planesValue );
114 explicit ClipPlanes( ::zerobuf::AllocatorPtr allocator );
116 ClipPlanes& operator = (
const ClipPlanes& rhs ) { ::zerobuf::Zerobuf::operator = ( rhs );
return *
this; }
120 std::string getSchema()
const final;
121 static std::string ZEROBUF_SCHEMA();
122 std::string getTypeName()
const final {
return "lexis::render::detail::ClipPlanes"; }
123 static std::string ZEROBUF_TYPE_NAME() {
return "lexis::render::detail::ClipPlanes"; }
124 ::zerobuf::uint128_t getTypeIdentifier()
const final { return ::zerobuf::uint128_t( 0xb8a9ca3c07385602ull, 0x5106497766ff020bull ); }
125 static ::zerobuf::uint128_t ZEROBUF_TYPE_IDENTIFIER() { return ::zerobuf::uint128_t( 0xb8a9ca3c07385602ull, 0x5106497766ff020bull ); }
126 size_t getZerobufStaticSize()
const final {
return 20; }
127 static size_t ZEROBUF_STATIC_SIZE() {
return 20; }
128 size_t getZerobufNumDynamics()
const final {
return 1; }
129 static size_t ZEROBUF_NUM_DYNAMICS() {
return 1; }
130 static ConstClipPlanesPtr create(
const void* data,
const size_t size ) {
return ConstClipPlanesPtr(
new ClipPlanes( ::zerobuf::AllocatorPtr( new ::zerobuf::ConstAllocator( reinterpret_cast< const uint8_t* >( data ), size )))); }
132 void _parseJSON(
const Json::Value& json )
final;
133 void _createJSON( Json::Value& json )
const final;
float * getNormal()
Get a pointer to the Normal fixed size array.
void setD(float value)
Set the D value.
void setNormal(float value[3])
Set the value of the Normal fixed size array from a float*.