@@ -688,7 +688,7 @@ bitflags::bitflags! {
688
688
/// an AH programs on the device. May affect the performance of the accel (seems to be larger).
689
689
///
690
690
/// Note that `PREFER_FAST_TRACE` and `PREFER_FAST_BUILD` are mutually exclusive.
691
- #[ derive( Default ) ]
691
+ #[ derive( Default , Clone , Copy , PartialEq , Eq , Debug ) ]
692
692
pub struct BuildFlags : OptixEnumBaseType {
693
693
const NONE = sys:: OptixBuildFlags_OPTIX_BUILD_FLAG_NONE ;
694
694
const ALLOW_UPDATE = sys:: OptixBuildFlags_OPTIX_BUILD_FLAG_ALLOW_UPDATE ;
@@ -714,18 +714,20 @@ impl Default for BuildOperation {
714
714
}
715
715
}
716
716
717
+ /// Configure how to handle ray times that are outside of the provided motion keys.
718
+ ///
719
+ /// By default, the object will appear static (clamped) to the nearest motion
720
+ /// key for rays outside of the range of key times.
721
+ ///
722
+ /// * `START_VANISH` - The object will be invisible to rays with a time less
723
+ /// than the first provided motion key
724
+ /// * `END_VANISH` - The object will be invisible to rays with a time less
725
+ /// than the first provided motion key
726
+ #[ derive( DeviceCopy , Clone , Copy , PartialEq , Eq , Debug ) ]
727
+ pub struct MotionFlags ( u16 ) ;
728
+
717
729
bitflags:: bitflags! {
718
- /// Configure how to handle ray times that are outside of the provided motion keys.
719
- ///
720
- /// By default, the object will appear static (clamped) to the nearest motion
721
- /// key for rays outside of the range of key times.
722
- ///
723
- /// * `START_VANISH` - The object will be invisible to rays with a time less
724
- /// than the first provided motion key
725
- /// * `END_VANISH` - The object will be invisible to rays with a time less
726
- /// than the first provided motion key
727
- #[ derive( DeviceCopy ) ]
728
- pub struct MotionFlags : u16 {
730
+ impl MotionFlags : u16 {
729
731
const NONE = sys:: OptixMotionFlags_OPTIX_MOTION_FLAG_NONE as u16 ;
730
732
const START_VANISH = sys:: OptixMotionFlags_OPTIX_MOTION_FLAG_START_VANISH as u16 ;
731
733
const END_VANISH = sys:: OptixMotionFlags_OPTIX_MOTION_FLAG_END_VANISH as u16 ;
@@ -1558,9 +1560,10 @@ const_assert_eq!(
1558
1560
std:: mem:: size_of:: <sys:: OptixInstance >( )
1559
1561
) ;
1560
1562
1563
+ #[ derive( DeviceCopy , Clone , Copy , PartialEq , Eq , Debug ) ]
1564
+ pub struct InstanceFlags ( OptixEnumBaseType ) ;
1561
1565
bitflags:: bitflags! {
1562
- #[ derive( DeviceCopy ) ]
1563
- pub struct InstanceFlags : OptixEnumBaseType {
1566
+ impl InstanceFlags : OptixEnumBaseType {
1564
1567
const NONE = sys:: OptixInstanceFlags_OPTIX_INSTANCE_FLAG_NONE ;
1565
1568
const DISABLE_TRIANGLE_FACE_CULLING = sys:: OptixInstanceFlags_OPTIX_INSTANCE_FLAG_DISABLE_TRIANGLE_FACE_CULLING ;
1566
1569
const FLIP_TRIANGLE_FACING = sys:: OptixInstanceFlags_OPTIX_INSTANCE_FLAG_FLIP_TRIANGLE_FACING ;
0 commit comments