--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject>
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="0.2095806474">
+<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.2095806474" moduleId="org.eclipse.cdt.core.settings" name="Default">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<configuration artifactName="MicroTrace01" buildProperties="" description="" id="0.2095806474" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
+<folderInfo id="0.2095806474." name="/" resourcePath="">
+<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.68488632" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
+<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.68488632.87519969" name=""/>
+<builder id="org.eclipse.cdt.build.core.settings.default.builder.1006486910" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+<tool id="org.eclipse.cdt.build.core.settings.holder.libs.310036409" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
+<tool id="org.eclipse.cdt.build.core.settings.holder.2063093098" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
+<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1249719671" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+</tool>
+<tool id="org.eclipse.cdt.build.core.settings.holder.1709318073" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
+<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.839936121" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+</tool>
+<tool id="org.eclipse.cdt.build.core.settings.holder.103734587" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
+<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.711344945" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+</tool>
+</toolChain>
+</folderInfo>
+</configuration>
+</storageModule>
+<storageModule moduleId="scannerConfiguration">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<scannerConfigBuildInfo instanceId="0.2095806474">
+<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="makefileGenerator">
+<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
+<buildOutputProvider>
+<openAction enabled="true" filePath=""/>
+<parser enabled="true"/>
+</buildOutputProvider>
+<scannerInfoProvider id="specsFile">
+<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
+<parser enabled="true"/>
+</scannerInfoProvider>
+</profile>
+</scannerConfigBuildInfo>
+</storageModule>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+</storageModule>
+<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+<project id="MicroTrace01.null.759633973" name="MicroTrace01"/>
+</storageModule>
+</cproject>
--- /dev/null
+*.o
+MicroTrace
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>MicroTrace01</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ </natures>
+</projectDescription>
#include "Vec3f.hxx"
-Vec3f::Vec3f()
-{
+Vec3f::Vec3f() {
+}
+Vec3f::Vec3f(float x, float y, float z) {
+ m_values[0] = x;
+ m_values[0] = y;
+ m_values[0] = z;
}
-Vec3f::Vec3f(float x, float y, float z)
-{
+Vec3f::~Vec3f() {
+}
+Vec3f::Vec3f(const Vec3f& o) {
+ for (size_t i = 0; i < DIM; i++) {
+ m_values[i] = o.m_values[i];
+ }
}
-Vec3f::~Vec3f()
-{
+Vec3f& Vec3f::operator=(const Vec3f& o) {
+ for (size_t i = 0; i < DIM; i++) {
+ m_values[i] = o.m_values[i];
+ }
+ return *this;
}
-Vec3f::Vec3f(const Vec3f& o)
-{
+float Vec3f::operator|(const Vec3f& o) {
+ return dot(o);
}
-Vec3f&
-Vec3f::operator=(const Vec3f& o)
-{
-
- return *this;
+float Vec3f::dot(const Vec3f& o) {
+ float prod = 0;
+ for (size_t i = 0; i < DIM; i++) {
+ prod += m_values[i] * o.m_values[i];
+ }
+ return prod;
}
-float
-Vec3f::operator|(const Vec3f& o)
-{
-
- return 0.0f;
+Vec3f Vec3f::operator%(const Vec3f& o) {
+ return cross(o);
}
-float
-Vec3f::dot(const Vec3f& o)
-{
-
- return 0.0f;
+Vec3f Vec3f::cross(const Vec3f& o) {
+ return Vec3f(m_values[1] * o.m_values[2] - m_values[2] * o.m_values[1],
+ m_values[2] * o.m_values[0] - m_values[0] * o.m_values[2], m_values[0]
+ * o.m_values[1] - m_values[1] * o.m_values[0]);
}
-
-Vec3f
-Vec3f::operator%(const Vec3f& o)
-{
- return Vec3f();
-}
+void Vec3f::normalize() {
-Vec3f
-Vec3f::cross(const Vec3f& o)
-{
-
- return Vec3f();
-}
-
-void
-Vec3f::normalize()
-{
-
}
-float
-Vec3f::norm() const
-{
- return 0.0f;
+float Vec3f::norm() const {
+ return sqrt(m_values[0] * m_values[0] + m_values[1] * m_values[1]
+ + m_values[2] * m_values[2]);
}
-Vec3f
-Vec3f::operator*(const float t) const
-{
- return Vec3f();
+Vec3f Vec3f::operator*(const float t) const {
+ Vec3f v(*this);
+ return v *= t;
}
-Vec3f&
-Vec3f::operator*=(const float t)
-{
- return *this;
+Vec3f& Vec3f::operator*=(const float t) {
+ for (unsigned int i = 0; i < 3; ++i) {
+ m_values[i] *= f;
+ }
+ return *this;
}
-Vec3f
-Vec3f::operator/(const float t) const
-{
- return Vec3f();
+Vec3f Vec3f::operator/(const float t) const {
+ Vec3f v(*this);
+ return v /= f;
}
-Vec3f&
-Vec3f::operator/=(const float t)
-{
- return *this;
+Vec3f& Vec3f::operator/=(const float t) {
+ for (unsigned int i = 0; i < 3; ++i) {
+ m_values[i] /= f;
+ }
+ return *this;
}
// example implementation of a standard operator
-Vec3f
-Vec3f::operator+(const Vec3f& o) const
-{
- Vec3f v(*this);
-
- return v += o;
+Vec3f Vec3f::operator+(const Vec3f& o) const {
+ Vec3f v(*this);
+ return v += o;
}
// example implementation of an in-place operator
-Vec3f&
-Vec3f::operator+=(const Vec3f& o)
-{
- for(unsigned int i = 0; i < 3; ++i)
- {
- m_values[i] += o.m_values[i];
- }
-
- return *this;
+Vec3f& Vec3f::operator+=(const Vec3f& o) {
+ for (unsigned int i = 0; i < 3; ++i) {
+ m_values[i] += o.m_values[i];
+ }
+ return *this;
}
-
-Vec3f
-Vec3f::operator-(const Vec3f& o) const
-{
- return Vec3f();
+
+Vec3f Vec3f::operator-(const Vec3f& o) const {
+ Vec3f v(*this);
+ return v -= o;
}
-Vec3f&
-Vec3f::operator-=(const Vec3f& o)
-{
- return *this;
+Vec3f& Vec3f::operator-=(const Vec3f& o) {
+ for (unsigned int i = 0; i < 3; ++i) {
+ m_values[i] -= o.m_values[i];
+ }
+ return *this;
}
-
-Vec3f
-Vec3f::operator*(const Vec3f& o) const
-{
- return Vec3f();
+
+Vec3f Vec3f::operator*(const Vec3f& o) const {
+ Vec3f v(*this);
+ return v *= o;
}
-Vec3f&
-Vec3f::operator*=(const Vec3f& o)
-{
- return *this;
+Vec3f& Vec3f::operator*=(const Vec3f& o) {
+ for (unsigned int i = 0; i < 3; ++i) {
+ m_values[i] *= o.m_values[i];
+ }
+ return *this;
}
-Vec3f
-Vec3f::operator/(const Vec3f& o) const
-{
- return Vec3f();
+Vec3f Vec3f::operator/(const Vec3f& o) const {
+ Vec3f v(*this);
+ return v /= o;
}
-Vec3f&
-Vec3f::operator/=(const Vec3f& o)
-{
- return *this;
+Vec3f& Vec3f::operator/=(const Vec3f& o) {
+ for (unsigned int i = 0; i < 3; ++i) {
+ m_values[i] /= o.m_values[i];
+ }
+ return *this;
}
-float
-Vec3f::operator[](unsigned int i) const
-{
- return 0.0f;
+float Vec3f::operator[](unsigned int i) const {
+ assert(i < DIM);
+ return m_values[i];
}
-float&
-Vec3f::operator[](unsigned int i)
-{
- assert(i < 3);
- return m_values[i];
+float& Vec3f::operator[](unsigned int i) {
+ assert(i < DIM);
+ return m_values[i];
}
#include <cmath>
#include <iostream>
-
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define Epsilon 1E-4
#define Infinity HUGE_VAL
+// dimension
+#define DIM 3
+
//! Standard operators and useful methods for 3d vectors
//! Fill in the missing parts in Vec3f.cxx
-class Vec3f
-{
+class Vec3f {
public:
- Vec3f();
- Vec3f(float x, float y, float z);
-
- ~Vec3f();
-
- Vec3f(const Vec3f& o);
- Vec3f& operator=(const Vec3f& o);
-
- //! dot product
- float operator|(const Vec3f& o);
- float dot(const Vec3f& o);
-
- //! cross product
- Vec3f operator%(const Vec3f& o);
- Vec3f cross(const Vec3f& o);
-
- //! normalize vector
- void normalize();
- //! length of a vector
- float norm() const;
-
- //! (self-)multiply with scalar
- Vec3f operator*(const float t) const;
- Vec3f& operator*=(const float t);
-
- //! (self-)division by scalar
- Vec3f operator/(const float t) const;
- Vec3f& operator/=(const float t);
-
- //! vector (self-)addition
- Vec3f operator+(const Vec3f& o) const;
- Vec3f& operator+=(const Vec3f& o);
-
- //! vector (self-)subtraction
- Vec3f operator-(const Vec3f& o) const;
- Vec3f& operator-=(const Vec3f& o);
-
- //! component-wise multiplication of two vectors
- Vec3f operator*(const Vec3f& o) const;
- Vec3f& operator*=(const Vec3f& o);
-
- //! component-wise division of two vectors
- Vec3f operator/(const Vec3f& o) const;
- Vec3f& operator/=(const Vec3f& o);
-
- //! element access functions ( read-only and read-write )
- float operator[](unsigned int i) const;
- float& operator[](unsigned int i);
-
+ Vec3f();
+ Vec3f(float x, float y, float z);
+
+ ~Vec3f();
+
+ Vec3f(const Vec3f& o);
+ Vec3f& operator=(const Vec3f& o);
+
+ //! dot product
+ float operator|(const Vec3f& o);
+ float dot(const Vec3f& o);
+
+ //! cross product
+ Vec3f operator%(const Vec3f& o);
+ Vec3f cross(const Vec3f& o);
+
+ //! normalize vector
+ void normalize();
+ //! length of a vector
+ float norm() const;
+
+ //! (self-)multiply with scalar
+ Vec3f operator*(const float t) const;
+ Vec3f& operator*=(const float t);
+
+ //! (self-)division by scalar
+ Vec3f operator/(const float t) const;
+ Vec3f& operator/=(const float t);
+
+ //! vector (self-)addition
+ Vec3f operator+(const Vec3f& o) const;
+ Vec3f& operator+=(const Vec3f& o);
+
+ //! vector (self-)subtraction
+ Vec3f operator-(const Vec3f& o) const;
+ Vec3f& operator-=(const Vec3f& o);
+
+ //! component-wise multiplication of two vectors
+ Vec3f operator*(const Vec3f& o) const;
+ Vec3f& operator*=(const Vec3f& o);
+
+ //! component-wise division of two vectors
+ Vec3f operator/(const Vec3f& o) const;
+ Vec3f& operator/=(const Vec3f& o);
+
+ //! element access functions ( read-only and read-write )
+ float operator[](unsigned int i) const;
+ float& operator[](unsigned int i);
+
private:
- float m_values[3];
+ float m_values[3];
};
-inline std::ostream& operator<<(std::ostream& o, const Vec3f& v)
-{
- o << "(" << v[0] << "," << v[1] << "," << v[2] << ")";
- return o;
+inline std::ostream& operator<<(std::ostream& o, const Vec3f& v) {
+ o << "(" << v[0] << "," << v[1] << "," << v[2] << ")";
+ return o;
}
#endif
-