00001 /******************************************************************************* 00002 Copyright (c) 2005-2009 David Williams 00003 00004 This software is provided 'as-is', without any express or implied 00005 warranty. In no event will the authors be held liable for any damages 00006 arising from the use of this software. 00007 00008 Permission is granted to anyone to use this software for any purpose, 00009 including commercial applications, and to alter it and redistribute it 00010 freely, subject to the following restrictions: 00011 00012 1. The origin of this software must not be misrepresented; you must not 00013 claim that you wrote the original software. If you use this software 00014 in a product, an acknowledgment in the product documentation would be 00015 appreciated but is not required. 00016 00017 2. Altered source versions must be plainly marked as such, and must not be 00018 misrepresented as being the original software. 00019 00020 3. This notice may not be removed or altered from any source 00021 distribution. 00022 *******************************************************************************/ 00023 00024 #include "PolyVoxCore/VertexTypes.h" 00025 00026 namespace PolyVox 00027 { 00028 PositionMaterialNormal::PositionMaterialNormal() 00029 { 00030 } 00031 00032 PositionMaterialNormal::PositionMaterialNormal(Vector3DFloat positionToSet, float materialToSet) 00033 :position(positionToSet) 00034 ,material(materialToSet) 00035 { 00036 00037 } 00038 00039 PositionMaterialNormal::PositionMaterialNormal(Vector3DFloat positionToSet, Vector3DFloat normalToSet, float materialToSet) 00040 :position(positionToSet) 00041 ,normal(normalToSet) 00042 ,material(materialToSet) 00043 { 00044 } 00045 00046 float PositionMaterialNormal::getMaterial(void) const 00047 { 00048 return material; 00049 } 00050 00051 const Vector3DFloat& PositionMaterialNormal::getNormal(void) const 00052 { 00053 return normal; 00054 } 00055 00056 const Vector3DFloat& PositionMaterialNormal::getPosition(void) const 00057 { 00058 return position; 00059 } 00060 00061 void PositionMaterialNormal::setMaterial(float materialToSet) 00062 { 00063 material = materialToSet; 00064 } 00065 00066 void PositionMaterialNormal::setNormal(const Vector3DFloat& normalToSet) 00067 { 00068 normal = normalToSet; 00069 } 00070 00071 void PositionMaterialNormal::setPosition(const Vector3DFloat& positionToSet) 00072 { 00073 position = positionToSet; 00074 } 00075 00077 // PositionMaterial 00079 00080 PositionMaterial::PositionMaterial() 00081 { 00082 } 00083 00084 PositionMaterial::PositionMaterial(Vector3DFloat positionToSet, float materialToSet) 00085 :position(positionToSet) 00086 ,material(materialToSet) 00087 { 00088 00089 } 00090 00091 float PositionMaterial::getMaterial(void) const 00092 { 00093 return material; 00094 } 00095 00096 const Vector3DFloat& PositionMaterial::getPosition(void) const 00097 { 00098 return position; 00099 } 00100 00101 void PositionMaterial::setMaterial(float materialToSet) 00102 { 00103 material = materialToSet; 00104 } 00105 00106 void PositionMaterial::setPosition(const Vector3DFloat& positionToSet) 00107 { 00108 position = positionToSet; 00109 } 00110 }