removed test directory, converted Shape's material handle to a refptr<Material> instead of a Material *, made refptr<T>::operator*() and operator->() const members
git-svn-id: svn://anubis/fart/trunk@96 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
2e82f9e2ea
commit
0fc1e468fe
10 files changed
+23
-79
No files matched your search
+1
-1
@@ -4,5 +4,5 @@
|
||||
Shape::Shape()
|
||||
{
|
||||
m_transparency = 0.0;
|
||||
m_material = NULL;
|
||||
m_material = new Material(Material::white);
|
||||
}
|
||||
+4
-3
@@ -7,6 +7,7 @@
|
||||
#include "util/Vector.h"
|
||||
#include "util/Transform.h"
|
||||
#include "main/Material.h"
|
||||
#include "util/refptr.h"
|
||||
#include <vector>
|
||||
|
||||
class Shape
|
||||
@@ -28,14 +29,14 @@ class Shape
|
||||
void setTransparency(double t) { m_transparency = t; }
|
||||
double getTransparency() const { return m_transparency; }
|
||||
|
||||
void setMaterial(Material * material) { m_material = material; }
|
||||
Material * getMaterial() const { return m_material; }
|
||||
void setMaterial(refptr<Material> material) { m_material = material; }
|
||||
refptr<Material> getMaterial() const { return m_material; }
|
||||
|
||||
protected:
|
||||
Transform m_transform;
|
||||
Transform m_inverse;
|
||||
double m_transparency;
|
||||
Material * m_material;
|
||||
refptr<Material> m_material;
|
||||
};
|
||||
|
||||
#include "Sphere.h"
|
||||
|
||||
Reference in new issue
Block a user