Skip to content

Commit e89f9d6

Browse files
Origin: Add documentation, convert objects to data objects
1 parent ebb276d commit e89f9d6

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/main/kotlin/graphics/scenery/Origin.kt

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@ import org.joml.Vector3f
88
* @author Ulrik Guenther <hello@ulrik.is>
99
*/
1010
sealed class Origin {
11-
object Center: Origin()
12-
object FrontBottomLeft: Origin()
13-
class Custom(val origin: Vector3f): Origin()
11+
/**
12+
* Volume origin will be the center of the volume.
13+
*/
14+
data object Center: Origin()
15+
16+
/**
17+
* Volume origin will be the front, bottom, left corner of the volume.
18+
*/
19+
data object FrontBottomLeft: Origin()
20+
21+
/**
22+
* Volume origin will be the custom vector given as [origin].
23+
*/
24+
data class Custom(val origin: Vector3f): Origin()
1425
}

0 commit comments

Comments
 (0)