This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Vector.h" | |
Vector::Vector(double px, double py, double pz) : x(px), y(py), z(pz) { | |
} | |
double Vector::Dot(Vector v) { | |
return (this->x * v.x) + (this->y * v.y) + (this->z * v.z); | |
} | |
double Vector::Length(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <math.h> | |
class Vector | |
{ | |
const double x, y, z; | |
public: | |
Vector(double x, double y, double z); | |
double Dot(Vector); | |
double Length(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FSharpTracer | |
open System | |
type Vector = | |
{ X : float | |
Y : float | |
Z : float } | |
member v.Dot(v1 : Vector) = (v.X * v1.X) + (v.Y * v1.Y) + (v.Z * v1.Z) | |
member v.Length() = sqrt (v.Dot v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float fTimer; | |
float fPixellateFactor = 1.0f; | |
sampler ColorMapSampler : register(s0); | |
float4 NormalShader(float2 Tex:TEXCOORD0) : COLOR | |
{ | |
float4 color = tex2D(ColorMapSampler, Tex); | |
return color; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ray | |
{ | |
private readonly Vector3D position; | |
private readonly Vector3D direction; | |
public Ray(Vector3D position, Vector3D direction) | |
{ | |
this.position = position; | |
this.direction = direction; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Ray(position : Vector3D, direction:Vector3D) = | |
member ray.Position = position | |
member ray.Direction = direction | |
NewerOlder