์œ ๋‹ˆํ‹ฐ์—์„œ ์ž‘์„ฑํ•œ ์Šคํฌ๋ฆฝํŠธ ํŒŒ์ผ์ธ๋ฐ.

๋‚ด๊ฐ€ ์ด์ •๋„ ์ดํ•ด ๋ชปํ•˜๋Š” ์ˆ˜์ค€์ด๋‹ค ๋ผ๋Š” ์˜ˆ์ œ ์ฝ”๋“œ์ž„..


์•ˆ์˜ ๋ญ ๋ณ€์ˆ˜ ์„ ์–ธ ํ•จ์ˆ˜ ์“ฐ๊ณ  ์ด๋Ÿฐ๊ฑด ๋ณ„๊ฑฐ ์—†์–ด ๋ณด์ด๋Š”๋ฐ.. ๊ทธ๋ƒฅ ๊ตฌ์กฐ์ž์ฒด๋ฅผ ์ดํ•ด๋ชปํ•˜๊ฒ ๋‹ค ์™œ ์ด๋ ‡๊ฒŒ ์ง ๊ฑฐ์•ผ.. ๊ผญ ์ด๋ ‡๊ฒŒ ์งœ์•ผ๋งŒ ํ–ˆ๋‚˜ ...


[System.Serializable]

public struct OVRPose

{

/// <summary>

/// A pose with no translation or rotation.

/// </summary>

public static OVRPose identity

{

get {

return new OVRPose()

{

position = Vector3.zero,

orientation = Quaternion.identity

};

}

}


public override bool Equals(System.Object obj)ย 

{

return obj is OVRPose && this == (OVRPose)obj;

}


public override int GetHashCode()ย 

{

return position.GetHashCode() ^ orientation.GetHashCode();

}


public static bool operator ==(OVRPose x, OVRPose y)ย 

{

return x.position == y.position && x.orientation == y.orientation;

}


public static bool operator !=(OVRPose x, OVRPose y)ย 

{

return !(x == y);

}


/// <summary>

/// The position.

/// </summary>

public Vector3 position;


/// <summary>

/// The orientation.

/// </summary>

public Quaternion orientation;


/// <summary>

/// Multiplies two poses.

/// </summary>

public static OVRPose operator*(OVRPose lhs, OVRPose rhs)

{

var ret = new OVRPose();

ret.position = lhs.position + lhs.orientation * rhs.position;

ret.orientation = lhs.orientation * rhs.orientation;

return ret;

}


/// <summary>

/// Computes the inverse of the given pose.

/// </summary>

public OVRPose Inverse()

{

OVRPose ret;

ret.orientation = Quaternion.Inverse(orientation);

ret.position = ret.orientation * -position;

return ret;

}


/// <summary>

/// Converts the pose from left- to right-handed or vice-versa.

/// </summary>

internal OVRPose flipZ()

{

var ret = this;

ret.position.z = -ret.position.z;

ret.orientation.z = -ret.orientation.z;

ret.orientation.w = -ret.orientation.w;

return ret;

}


internal OVRPlugin.Posef ToPosef()

{

return new OVRPlugin.Posef()

{

Position = position.ToVector3f(),

Orientation = orientation.ToQuatf()

};

}

}


๊ตฌ์กฐ์ฒด ์•ˆ์— ๊ตฌ์กฐ์ฒด ๋“ค์–ด๊ฐ€์žˆ๊ณ  ์˜ค๋ฒ„๋ผ์ด๋“œ์—.. ์”..

์„ ์–ธํ•ด์ฃผ๋Š”๊ฒƒ๋“ค? ์ ‘๊ทผ์ œํ•œ์ž? ์ด๋Ÿฐ๊ฒƒ๋“ค๋„ ์ดํ•ด๋ชปํ•˜๊ฒ ๊ณ 

์ด์ •๋„ ์ดํ•ด ๋ชปํ•˜๋Š” ์‚ฌ๋žŒ์—๊ฒŒ c#๊ณต๋ถ€๋ฅผ ํ•œ๋‹ค๋ฉด ๋ญ˜ ์ถ”์ฒœ ํ•ด์ฃผ๊ณ  ์‹ถ์Œ? ์–ด๋А ๋ถ€๋ถ„?ย 

๊ธฐ์ดˆ์ฑ…์€ ๋ง‰ if๋ฌธ for๋ฌธ ๋„ˆ๋ฌด ๊ธฐ์ดˆ์ ์ธ ๊ฒƒ๋ถ€ํ„ฐ ์žˆ์–ด์„œ ์ข€ ๋ฐฐ์›Œ์•ผ ํ• ๋ถ€๋ถ„๋งŒ ๋ญ ๊ฐ์ฒด์ง€ํ–ฅ์˜ ์ดํ•ด๋ผ๋˜์ง€ ๋ถ€๋ถ„๋ถ€๋ถ„ ๊ณจ๋ผ์„œ ๋ณด๊ณ ์‹ถ์€๋ฐ..