New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinate space? #2

Closed
io7m opened this Issue Nov 21, 2016 · 2 comments

Comments

Projects
None yet
1 participant
@io7m
Owner

io7m commented Nov 21, 2016

The basic assumption everywhere is a right-handed coordinate system with positive Y as the UP vector. This either needs to be documented, or it needs to be something specified on a per-file basis.

@io7m io7m added the enhancement label Nov 21, 2016

@io7m io7m self-assigned this Nov 21, 2016

@io7m io7m added the specification label Nov 21, 2016

@io7m

This comment has been minimized.

Show comment
Hide comment
@io7m

io7m Nov 22, 2016

Owner

Being able to state in the file what the coordinate space is seems best. It seems like this could be specified as a pair of values:

data Forward 
  = FORWARD_POSITIVE_X 
  | FORWARD_POSITIVE_Y
  | FORWARD_POSITIVE_Z
  | FORWARD_NEGATIVE_X 
  | FORWARD_NEGATIVE_Y 
  | FORWARD_NEGATIVE_Z

data Up 
  = UP_POSITIVE_X 
  | UP_POSITIVE_Y 
  | UP_POSITIVE_Z 
  | UP_NEGATIVE_X
  | UP_NEGATIVE_Y 
  | UP_NEGATIVE_Z

... with the constraint that the values can't both use the same axis. Given the two axes, there are only two choices for the remaining axis.

The Forward and Up axis values can be encoded in 3 bits each, with one bit to indicate if the third axis is positive or negative.

Owner

io7m commented Nov 22, 2016

Being able to state in the file what the coordinate space is seems best. It seems like this could be specified as a pair of values:

data Forward 
  = FORWARD_POSITIVE_X 
  | FORWARD_POSITIVE_Y
  | FORWARD_POSITIVE_Z
  | FORWARD_NEGATIVE_X 
  | FORWARD_NEGATIVE_Y 
  | FORWARD_NEGATIVE_Z

data Up 
  = UP_POSITIVE_X 
  | UP_POSITIVE_Y 
  | UP_POSITIVE_Z 
  | UP_NEGATIVE_X
  | UP_NEGATIVE_Y 
  | UP_NEGATIVE_Z

... with the constraint that the values can't both use the same axis. Given the two axes, there are only two choices for the remaining axis.

The Forward and Up axis values can be encoded in 3 bits each, with one bit to indicate if the third axis is positive or negative.

@io7m

This comment has been minimized.

Show comment
Hide comment
@io7m

io7m Nov 27, 2016

Owner

What about triangle winding order?

Owner

io7m commented Nov 27, 2016

What about triangle winding order?

@io7m io7m closed this in 1d8dc63 Nov 28, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment