Differences From Artifact [06e4bde8d0]:
- File
src/OFObject.h
— part of check-in
[44eb35b212]
at
2023-02-12 22:20:39
on branch trunk
— Add OFMatrix4x4 and OFVector3D
These will be useful for 3D graphics. (user: js, size: 42011) [annotate] [blame] [check-ins using] [more...]
To Artifact [01a23b3a57]:
- File
src/OFObject.h
— part of check-in
[db7991d07b]
at
2023-02-16 19:59:20
on branch trunk
— OFVector3D -> OFPoint3D
For now, we're only interested in transformed points. (user: js, size: 41990) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
151 152 153 154 155 156 157 | * @brief A time interval in seconds. */ typedef double OFTimeInterval; /** * @struct OFPoint OFObject.h ObjFW/OFObject.h * | | | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | * @brief A time interval in seconds. */ typedef double OFTimeInterval; /** * @struct OFPoint OFObject.h ObjFW/OFObject.h * * @brief A point in 2D space. */ typedef struct OF_BOXABLE { /** The x coordinate of the point */ float x; /** The y coordinate of the point */ float y; } OFPoint; |
︙ | ︙ | |||
292 293 294 295 296 297 298 | if (!OFEqualSizes(rect1.size, rect2.size)) return false; return true; } /** | | | | | | | | | | | | | | | | | | | | | | | | | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | if (!OFEqualSizes(rect1.size, rect2.size)) return false; return true; } /** * @struct OFPoint3D OFObject.h ObjFW/OFObject.h * * @brief A point in 3D space. */ typedef struct OF_BOXABLE { /** The x coordinate of the point */ float x; /** The y coordinate of the point */ float y; /** The z coordinate of the point */ float z; } OFPoint3D; /** * @brief Creates a new OFPoint3D. * * @param x The x coordinate of the point * @param y The x coordinate of the point * @param z The z coordinate of the point * @return An OFPoint3D with the specified coordinates */ static OF_INLINE OFPoint3D OF_CONST_FUNC OFMakePoint3D(float x, float y, float z) { OFPoint3D point = { x, y, z }; return point; } /** * @brief Returns whether the two points are equal. * * @param point1 The first point for the comparison * @param point2 The second point for the comparison * @return Whether the two points are equal */ static OF_INLINE bool OFEqualPoints3D(OFPoint3D point1, OFPoint3D point2) { if (point1.x != point2.x) return false; if (point1.y != point2.y) return false; if (point1.z != point2.z) return false; return true; } /** * @brief Adds the specified byte to the hash. |
︙ | ︙ |