CN106780350B - 3D model rotation angle self-matching system and method based on rotation angle model library - Google Patents

3D model rotation angle self-matching system and method based on rotation angle model library Download PDF

Info

Publication number
CN106780350B
CN106780350B CN201611081176.XA CN201611081176A CN106780350B CN 106780350 B CN106780350 B CN 106780350B CN 201611081176 A CN201611081176 A CN 201611081176A CN 106780350 B CN106780350 B CN 106780350B
Authority
CN
China
Prior art keywords
model
angle
rotation angle
builder
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611081176.XA
Other languages
Chinese (zh)
Other versions
CN106780350A (en
Inventor
王征
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taixuan Technology (Nanjing) Co., Ltd.
Original Assignee
Taixuan Technology Nanjing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taixuan Technology Nanjing Co ltd filed Critical Taixuan Technology Nanjing Co ltd
Priority to CN201611081176.XA priority Critical patent/CN106780350B/en
Publication of CN106780350A publication Critical patent/CN106780350A/en
Application granted granted Critical
Publication of CN106780350B publication Critical patent/CN106780350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/60Rotation of a whole image or part thereof
    • G06T3/604Rotation of a whole image or part thereof using a CORDIC [COordinate Rotation Digital Compute] device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a 3D model rotation angle self-matching system and method based on a rotation angle model library, and belongs to the field of 3D design. The system comprises 5 modules, namely a 3D model builder, a rotation angle model base builder, a 3D model rotation angle calculator, a 3D model node coordinate calculator and a 3D model renderer. The method comprises the steps of 1, initializing object information of a 3D model; step 2, calculating the angle of each reference surface; step 3, calculating the rotation angle of the 3D model; step 4, rotating the 3D model; step 5, drawing a 3D model; the problems that when the 3D model is loaded or rotated, the rotation angle needs to be manually set, the operation is difficult, and the precision is poor are solved through the cooperation among the modules.

Description

3D model rotation angle self-matching system and method based on rotation angle model library
Technical Field
The invention belongs to the field of modeling design, and particularly relates to a 3D model rotation angle self-matching system and method based on a rotation angle model library.
Background
With the strong desire of people to seek more realistic virtual reality, 3D virtual reality technology is also popularized. However, in the existing living room 3D model modeling technology, operations such as installation or rotation of furniture are often involved, and these operations all require manual intervention to set the rotation angle, but manual setting of the rotation angle is inconvenient and inaccurate, so the operation cost of the user for 3D modeling is greatly increased.
Disclosure of Invention
1. Problems to be solved
Aiming at the problems that the furniture rotation angle is difficult and inaccurate to set through manual intervention during the 3D model modeling of the existing room, the invention provides a 3D model rotation angle self-matching system based on a rotation angle model base and a method for carrying out 3D model rotation angle self-matching according to the system, so that the 3D modeling difficulty can be effectively reduced, and the precision of the 3D model rotation angle in the 3D modeling is improved.
2. Technical scheme
In order to solve the above problems, the present invention adopts the following technical solutions.
A3D model rotation angle self-matching system based on a rotation angle model base comprises a 3D model builder, a rotation angle model base builder, a 3D model rotation angle calculator, a 3D model node coordinate calculator and a 3D model renderer; the 3D model builder is in one-way connection with the 3D model rotation angle calculator; the 3D model rotation angle calculator is in one-way connection with the 3D model node coordinate calculator; the 3D model node coordinate calculator is in bidirectional connection with the 3D model builder; the 3D model builder is in one-way connection with the 3D model renderer; the rotation angle model base builder is in one-way connection with the 3D model rotation angle calculator.
Preferably, the 3D model builder is configured to record object information of the 3D model.
Preferably, the object information includes coordinates of each node of the 3D model, an offset angle of an OBB bounding box of the 3D model, and rotation reference point coordinates in the OBB bounding box of the 3D model.
A3D model rotation angle self-matching method based on a rotation angle model library comprises the following steps:
step 1, initializing object information of a 3D model; respectively transmitting the object information to a 3D model rotation angle calculator and a 3D model node coordinate calculator through a 3D model builder;
step 2, calculating the angle of each reference surface; transmitting the angle of the reference surface to the 3D model rotation angle calculator through a rotation angle model base builder;
step 3, calculating the rotation angle of the 3D model; the method comprises the steps of calculating the rotation angle of a 3D model attached to a reference surface and calculating the rotation angle of the 3D model detached from the reference surface; transmitting the rotation angle of the 3D model to a 3D model node coordinate calculator through the 3D model rotation angle calculator;
step 4, rotating the 3D model; rotating coordinates of each node of the 3D model by taking the coordinates of the reference point in the object information as a center according to the rotation angle of the 3D model in the step 3; transmitting the object information of the rotated 3D model to the 3D model builder, and updating the object information of the corresponding 3D model by the 3D model builder;
step 5, drawing a 3D model; and the 3D model renderer acquires the updated object information of the 3D model in the step 4 from the 3D model builder, and draws the 3D model according to the object information.
Preferably, the object information in step 1 includes: coordinates of each node of the 3D model, an offset angle of an OBB bounding box of the 3D model, and rotational reference point coordinates in the OBB bounding box of the 3D model.
Preferably, the method for acquiring the offset angle of the OBB bounding box is as follows: and measuring the coordinates of each node of the OBB bounding box according to the coordinates of each node of the 3D model, projecting the coordinates of each node on the back of the OBB bounding box to the ground to form a projection line segment, and measuring the angle formed by the line segment on the ground and recording the angle as the offset angle of the OBB bounding box of the 3D model.
Preferably, in step 2, the coordinates of each node on the reference surface are first obtained by the rotation angle model base builder, then the projected line segment is formed by vertically projecting the coordinates onto the ground, and the angle formed by the projected line segment on the ground is recorded to obtain the angle of the reference surface.
Preferably, the method for obtaining the rotation angle of the 3D model attached to the reference surface in step 3 is: extracting the offset angle of an OBB bounding box of the 3D model in the object information and the angle of a target reference plane in the angles of the reference plane in the step 2 by a 3D model rotation angle calculator; recording a difference value obtained by subtracting the offset angle of the OBB bounding box of the 3D model from the angle of the target reference surface as the rotation angle of the 3D model; the target reference surface is a reference surface to which the 3D model is to be attached.
Preferably, the method for acquiring the rotation angle of the 3D model out of the reference plane in step 3 is: extracting an offset angle of the OBB bounding box in the object information through a 3D model rotation angle calculator; recording a difference value obtained by subtracting the offset angle of the OBB bounding box from the angle of each reference plane one by one as an angle group angle _ group _ 1; adding 90 degrees to the angles in the angle group angle _ group _1 to form an angle group angle _ group _2 vertical to the angle group angle _ group _ 1; then, remapping all angles in the angle group angle _ group _1 and the angle group angle _ group _2 into angles ranging from 0 degree to 360 degrees respectively to obtain an angle group angle _ group _ 3; then, the angle group angle _ group _3 is reordered according to the angle values in ascending or descending order to form an angle group angle _ group _ 4; the minimum angle value greater than 0 in the angle group angle _ group _4 is taken to be recorded as the rotation angle of the 3D model.
3. Advantageous effects
Compared with the prior art, the invention has the beneficial effects that:
(1) the invention provides a rotation angle model base builder and a 3D model rotation angle calculator, namely, a method for automatically building a rotation angle model base according to a reference surface and automatically matching an angle needing to be rotated based on the built rotation angle model base is invented, the back surface of an OBB bounding box of a 3D model is finally obtained, the back surface is parallel to the reference surface or perpendicular to the reference surface, the rotation angles are automatically calculated by a system and do not need to be manually set, and the problem that the rotation angles of the 3D model in the prior modeling technology need to be manually set is solved;
(2) according to the method for automatically matching the angle required to rotate according to the established rotation angle model library when the furniture 3D model is installed or rotated in the room 3D model, the angle does not need to be manually set in the whole angle rotation process, the rotation angle obtained by the method for automatically matching the angle is very high in precision, and the problem that the rotation angle of the 3D model is not accurate is solved.
Drawings
FIG. 1 is a schematic view of the 3D model angular rotation of the present invention;
in the figure: 1. a ground surface; 2. a reference surface; 3. moving outside the reference plane; 4. moving inside the reference surface; 5. rotating away from the reference plane; 6. the OBB encompasses the back of the cartridge.
FIG. 2 is a diagram showing the connection relationship between modules of the system of the present invention;
FIG. 3 is a flow chart of the algorithm of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings.
A3D model rotation angle self-matching system based on a rotation angle model base comprises a 3D model builder, a rotation angle model base builder, a 3D model rotation angle calculator, a 3D model node coordinate calculator and a 3D model renderer;
as shown in fig. 2, the 3D model builder is connected to the 3D model rotation angle calculator in a one-way manner; the 3D model rotation angle calculator is in one-way connection with the 3D model node coordinate calculator; the 3D model node coordinate calculator is in bidirectional connection with the 3D model builder; the 3D model builder is in one-way connection with the 3D model renderer; the rotation angle model base builder is in one-way connection with the 3D model rotation angle calculator;
the 3D model builder is a module as follows: object information for recording a 3D model, the object information comprising: coordinates of each node of the 3D model, an offset angle of an OBB bounding box of the 3D model and coordinates of a rotation reference point in the OBB bounding box of the 3D model; respectively transmitting the relevant information of the object to a 3D model rotation angle calculator and then transmitting the relevant information to a 3D model node coordinate calculator through the 3D model rotation angle calculator;
the rotation angle model library builder is a module as follows: the device comprises a three-dimensional (3D) model rotation angle calculator, a three-dimensional (four-dimensional) model rotation angle calculator and a three-dimensional (four-dimensional) model rotation angle calculator, wherein the three-dimensional model rotation angle calculator is used for collecting node coordinates of all reference surfaces, calculating angles of all reference surfaces according to the node coordinates and transmitting the angles of all reference surfaces to the three-; the reference plane is a plane perpendicular to the ground; fig. 1 shows a case of a reference plane 2 perpendicular to the ground 1;
the 3D model rotation angle calculator is a module as follows: calculating a rotation angle required by the 3D model according to the angle of each reference plane acquired from the rotation angle model base builder and the offset angle of the OBB bounding box of the 3D model acquired from the 3D model builder, and transmitting the rotation angle of the 3D model and the object information of the 3D model to the 3D model node coordinate calculator;
the 3D model node coordinate calculator is a module as follows: calculating coordinates of each node of the rotated 3D model according to the rotation angle required by the 3D model obtained from the 3D model rotation angle calculator and the 3D model information obtained from the 3D model builder; transmitting the calculated node coordinates to a 3D model builder to update the object information of the corresponding 3D model;
the 3D model renderer is a module as follows: and drawing the 3D model according to the 3D model object information acquired from the 3D model builder.
A 3D model rotation angle self-matching method based on a rotation angle model library, as shown in fig. 3, includes the following steps:
step 1, initializing object information of a 3D model;
the object information of the 3D model is recorded in the 3D model builder;
the object information of the 3D model includes: coordinates of each node of the 3D model, an offset angle of an OBB bounding box of the 3D model and coordinates of a rotation reference point in the OBB bounding box of the 3D model;
the 3D model builder transmits the object information to a 3D model rotation angle calculator and a 3D model node coordinate calculator respectively;
the coordinates of each node of the 3D model can be directly read when the 3D model is loaded, and the coordinates of each node can be stored in an array or a linked list without limitation;
the method for acquiring the offset angle of the OBB bounding box comprises the following steps: measuring the coordinates of each node of the OBB bounding box according to the coordinates of each node of the 3D model, projecting the coordinates of each node on the back of the OBB bounding box to the ground to form a projection line segment, and measuring the angle formed by the line segment on the ground and recording the angle as the offset angle of the OBB bounding box of the 3D model; the location of the OBB enclosure back 6 is illustrated in fig. 1;
step 2, calculating the angle of each reference surface;
the specific operation method comprises the steps of firstly obtaining coordinates of each node on a reference surface through a rotation angle model base builder, then carrying out vertical projection on the reference surface to form a projection line segment, and recording an angle formed by the projection line segment on the ground to obtain an angle of the reference surface;
the rotation angle model base builder transmits the angle of the reference surface to the 3D model rotation angle calculator;
step 3, calculating the rotation angle of the 3D model;
as shown in fig. 1, the calculation of the rotation angle of the 3D model includes two cases of dependent reference plane rotation (including movement 3 outside the reference plane and movement 4 inside the reference plane) and detached reference plane rotation 5; the calculation scheme for the rotation angle of the 3D model attached to the reference surface is different from the calculation scheme for the rotation angle of the 3D model detached from the reference surface, and specifically includes the following steps:
obtaining the rotation angle of the 3D model attached to the reference surface: the 3D model rotation angle calculator receives the object information of the 3D model from the 3D model builder in the step 1 and receives the angle of the reference surface from the rotation angle model library builder in the step 2; extracting the offset angle of an OBB bounding box of the 3D model in the object information of the 3D model and extracting the angle of a target reference plane in the angles of the reference plane; recording a difference value obtained by subtracting the offset angle of the OBB bounding box of the 3D model from the angle of the target reference surface as the rotation angle of the 3D model;
the target reference surface is a reference surface to which the 3D model is attached;
the 3D model can depend on the inner side of the reference surface and also can depend on the outer side of the reference surface, but the 3D model rotation angle acquisition method is the same whether the 3D model rotation angle acquisition method is in the case of moving 3 on the outer side of the reference surface or in the case of moving 4 on the inner side of the reference surface as shown in FIG. 1;
obtaining the rotation angle of the 3D model out of the reference plane: acquiring the angle of each reference plane from the rotation angle model base builder and the object information of the 3D model from the 3D model builder, and extracting the offset angle of the OBB bounding box in the object information of the 3D model; recording a difference value obtained by subtracting the offset angle of the OBB bounding box from the angle of each reference plane one by one as an angle group angle _ group _ 1; adding 90 degrees to the angles in the angle group angle _ group _1 to form an angle group angle _ group _2 vertical to the angle group angle _ group _ 1; then, remapping all angles in the angle group angle _ group _1 and the angle group angle _ group _2 into angles ranging from 0 degrees to 360 degrees (the range angles include 0 degrees but not 360 degrees), and obtaining an angle group angle _ group _ 3; then, the angle group angle _ group _3 is reordered according to the angle values in ascending or descending order to form an angle group angle _ group _ 4; recording the minimum angle value which is greater than 0 in the angle group angle _ group _4 as the rotation angle of the 3D model;
transmitting the rotation angle of the obtained 3D model and the object information of the 3D model to a 3D model node coordinate calculator;
step 4, rotating the 3D model;
acquiring the rotation angle of the 3D model and the object information of the 3D model obtained in step 3 from the 3D model rotation angle calculator, and rotating each node coordinate of the 3D model by the 3D model rotation angle in step 3 with the reference point coordinate in the object information of the 3D model as a center (the angle after the rotation is the angle before the 3D model is rotated plus the rotated angle); finally, transmitting the object information of the rotated 3D model to the 3D model builder, and updating the object information of the corresponding 3D model by the 3D model builder;
step 5, drawing a 3D model;
and the 3D model renderer acquires the updated object information of the 3D model in the step 4 from the 3D model builder, and draws the 3D model according to the object information.
The invention is further described with reference to specific examples.
Example 1
The present embodiment is described with respect to the installation of a wall air conditioner on-hook.
A3D model rotation angle self-matching method based on a rotation angle model library comprises the following steps:
step 1, initializing object information of a 3D model; respectively transmitting the object information to a 3D model rotation angle calculator and a 3D model node coordinate calculator through a 3D model builder;
step 2, calculating the angle of each reference surface;
the specific operation method comprises the steps of firstly obtaining coordinates of each node on each wall surface in a room through the 3D model builder, then vertically projecting the coordinates of each node on the wall surface to the ground to form a projection line segment, and recording an angle formed by the projection line segment on the ground to obtain an angle of a reference surface;
the 3D model builder records the angle of the reference surface obtained in the step and transmits the angle of the reference surface to the 3D model rotation angle calculator;
step 3, calculating the rotation angle of the 3D model;
the air conditioner hanging machine belongs to a 3D model attached to a reference surface, and the 3D model attached to the reference surface obtains the rotation angle: the angle of each reference surface acquired from the rotation angle model base builder and the object information of the 3D model of the air conditioner on-hook acquired from the 3D model builder are acquired, the offset angle of the OBB bounding box is acquired from the object information of the 3D model, and the offset angle of the OBB bounding box of the 3D model of the air conditioner on-hook is subtracted from the angle of the target wall surface to obtain the rotation angle of the 3D model; the target reference surface is the reference surface to which the 3D model is to be attached.
Transmitting the rotation angle of the 3D model of the air conditioner on-hook and the object information of the 3D model to a 3D model node coordinate calculator;
step 4, rotating the 3D model;
acquiring the rotation angle of the 3D model of the air conditioner on-hook and the object information of the 3D model of the air conditioner on-hook obtained in the step 3 from the 3D model rotation angle calculator, and rotating each node coordinate of the 3D model according to the 3D model rotation angle in the step 3 by taking the reference node coordinate in the object information of the 3D model as a center (the angle after the rotation is the angle before the 3D model is rotated plus the rotated angle); finally, transmitting the object information of the rotated 3D model to the 3D model builder, and updating the object information of the corresponding 3D model by the 3D model builder;
step 5, drawing a 3D model;
and the 3D model renderer acquires the updated object information of the 3D model of the on-hook air conditioner in the step 4 from the 3D model builder, and draws the 3D model of the on-hook air conditioner according to the object information.
Example 2
This embodiment is illustrated with respect to a plaster line installation of a suspended ceiling, assuming the suspended ceiling is shaped as a five-pointed star.
A3D model rotation angle self-matching method based on a rotation angle model library comprises the following steps:
step 1, initializing object information of a 3D model; respectively transmitting the object information to a 3D model rotation angle calculator and a 3D model node coordinate calculator through a 3D model builder;
step 2, calculating the angle of each reference surface;
the specific operation method comprises the steps of firstly obtaining coordinates of each node on a pentagram polygon forming the suspended ceiling through the 3D model builder, then vertically projecting the coordinates of each node on the pentagram polygon forming the suspended ceiling to the ground to form a projection line segment, and recording an angle formed by the projection line segment on the ground to obtain an angle of a reference surface;
the 3D model builder records the angle of the reference surface obtained in the step and transmits the angle of the reference surface to the 3D model rotation angle calculator;
calculating the rotation angle of the 3D model;
the plaster line belongs to a 3D model attached to the reference surface, and the acquisition of the rotation angle of the 3D model attached to the reference surface is as follows: the angle of each reference surface acquired from the rotation angle model base builder and the object information of the 3D model of the gypsum line acquired from the 3D model builder are acquired, the offset angle of the OBB bounding box is acquired from the object information of the 3D model, and the offset angle of the OBB bounding box of the 3D model of the gypsum line is subtracted from the angle of the side corresponding to the target suspended ceiling polygon to obtain the rotation angle of the 3D model; the target reference surface is the reference surface to which the 3D model is to be attached.
Transmitting the rotation angle of the 3D model of the plaster line and the object information of the 3D model to a 3D model node coordinate calculator;
step 4, rotating the 3D model;
acquiring the rotation angle of the 3D model of the plaster line and the object information of the 3D model of the plaster line obtained in step 3 from the 3D model rotation angle calculator, and rotating each node coordinate of the 3D model by the 3D model rotation angle described in step 3 (the angle after the rotation is the angle before the 3D model is rotated plus the rotated angle) with the reference node coordinate in the object information of the 3D model as the center; finally, transmitting the object information of the rotated 3D model to the 3D model builder, and updating the object information of the corresponding 3D model by the 3D model builder;
step 5, drawing a 3D model;
the 3D model renderer acquires the object information of the 3D model of the plaster line updated in step 4 from the 3D model builder, and draws the 3D model of the plaster line according to the object information.
Example 3
The present embodiment is described with reference to the rotation of the dining table.
A3D model rotation angle self-matching method based on a rotation angle model library comprises the following steps:
step 1, initializing object information of a 3D model; respectively transmitting the object information to a 3D model rotation angle calculator and a 3D model node coordinate calculator through a 3D model builder;
step 2, calculating the angle of each reference surface;
the specific operation method comprises the steps of firstly obtaining coordinates of each node on each wall surface in a room through the 3D model builder, then vertically projecting the coordinates of each node on the wall surface to the ground to form a projection line segment, and recording an angle formed by the projection line segment on the ground to obtain an angle of a reference surface;
the 3D model builder records the angle of the reference surface obtained in the step and transmits the angle of the reference surface to the 3D model rotation angle calculator;
step 3, calculating the rotation angle of the 3D model;
the dining table belongs to a 3D model separated from a reference surface, and the rotation angle of the 3D model separated from the reference surface is obtained: acquiring the angle of each wall surface from the rotation angle model base builder and the object information of the 3D model of the dining table from the 3D model builder, and extracting the offset angle of the OBB bounding box in the object information of the 3D model of the dining table; recording a difference value obtained by subtracting the offset angle of the OBB bounding box from the angle of each wall surface one by one as an angle group angle _ group _ 1; adding 90 degrees to the angles in the angle group angle _ group _1 to form an angle group angle _ group _2 vertical to the angle group angle _ group _ 1; then, remapping all angles in the angle group angle _ group _1 and the angle group angle _ group _2 into angles ranging from 0 degrees to 360 degrees (the range angles include 0 degrees but not 360 degrees), and obtaining an angle group angle _ group _ 3; then, the angle group angle _ group _3 is reordered according to the angle values in ascending or descending order to form an angle group angle _ group _ 4; recording the minimum angle value which is greater than 0 in the angle group angle _ group _4 as the rotation angle of the 3D model;
transmitting the rotation angle of the 3D model of the dining table and the object information of the 3D model of the dining table to a 3D model node coordinate calculator;
step 4, rotating the 3D model;
acquiring the rotation angle of the 3D model of the dining table and the object information of the 3D model of the dining table obtained in the step 3 from the 3D model rotation angle calculator, and rotating each node coordinate of the 3D model by the 3D model rotation angle in the step 3 with the reference node coordinate in the object information of the 3D model as a center (the angle after the rotation is the angle before the rotation of the 3D model plus the rotated angle); finally, transmitting the object information of the rotated 3D model to the 3D model builder, and updating the object information of the corresponding 3D model by the 3D model builder;
step 5, drawing a 3D model;
and the 3D model renderer acquires the updated object information of the 3D model of the dining table in the step 4 from the 3D model builder, and draws the 3D model of the dining table according to the object information.

Claims (6)

1. A3D model rotation angle self-matching system based on a rotation angle model library is characterized in that: the three-dimensional model rendering method comprises a 3D model builder, a rotation angle model base builder, a 3D model rotation angle calculator, a 3D model node coordinate calculator and a 3D model renderer;
the 3D model builder is used for recording object information of the 3D model, wherein the object information is respectively transmitted to the 3D model rotation angle calculator and the 3D model node coordinate calculator through the 3D model builder, and the 3D model node coordinate calculator is in bidirectional connection with the 3D model builder;
the rotation angle model base builder is connected with the 3D model rotation angle calculator in a one-way mode, and is used for collecting node coordinates of each reference surface, calculating the angle of each reference surface according to the node coordinates, and transmitting the angle of each reference surface to the 3D model rotation angle calculator, wherein the reference surface is a surface perpendicular to the ground;
the 3D model rotation angle calculator is in one-way connection with the 3D model node coordinate calculator, calculates a rotation angle required by the 3D model according to the angle of each reference surface acquired from the rotation angle model base builder and the object information acquired from the 3D model builder, and transmits the rotation angle of the 3D model to the 3D model node coordinate calculator;
the 3D model node coordinate calculator calculates coordinates of each node of the rotated 3D model according to the rotation angle required by the 3D model acquired from the 3D model rotation angle calculator and the 3D model information acquired from the 3D model builder, and transmits the calculated node coordinates to the 3D model builder so as to update the object information of the corresponding 3D model;
and the 3D model builder is in one-way connection with the 3D model renderer, and the 3D model renderer acquires the updated object information of the 3D model from the 3D model builder to draw the 3D model.
2. The rotation angle self-matching system for 3D model based on rotation angle model library according to claim 1, wherein: the 3D model builder is a module for recording object information of a 3D model.
3. The rotation angle self-matching system for 3D model based on rotation angle model library according to claim 2, wherein: the object information comprises coordinates of each node of the 3D model, an offset angle of an OBB bounding box of the 3D model and a rotation reference point coordinate in the OBB bounding box of the 3D model, and the method for acquiring the offset angle of the OBB bounding box comprises the following steps: and measuring the coordinates of each node of the OBB bounding box according to the coordinates of each node of the 3D model, projecting the coordinates of each node on the back of the OBB bounding box to the ground to form a projection line segment, and measuring the angle formed by the line segment on the ground and recording the angle as the offset angle of the OBB bounding box of the 3D model.
4. A3D model rotation angle self-matching method based on a rotation angle model library comprises the following steps:
step 1, initializing object information of a 3D model; respectively transmitting the object information to a 3D model rotation angle calculator and a 3D model node coordinate calculator through a 3D model builder;
step 2, calculating the angle of each reference surface; transmitting the angle of the reference surface to the 3D model rotation angle calculator through a rotation angle model base builder;
step 3, calculating the rotation angle of the 3D model; the method comprises the steps of calculating the rotation angle of a 3D model attached to a reference surface and calculating the rotation angle of the 3D model detached from the reference surface; and (3) transmitting the 3D model rotation angle to a 3D model node coordinate calculator through a 3D model rotation angle calculator, wherein the method for acquiring the 3D model rotation angle attached to the reference surface in the step (3) comprises the following steps: extracting the offset angle of an OBB bounding box of the 3D model in the object information and the angle of a target reference plane in the angles of the reference plane in the step 2 by a 3D model rotation angle calculator; recording a difference value obtained by subtracting the offset angle of the OBB bounding box of the 3D model from the angle of the target reference surface as the rotation angle of the 3D model; the target reference surface is a reference surface to which the 3D model is attached;
the method for acquiring the rotation angle of the 3D model out of the reference plane in the step 3 comprises the following steps: extracting an offset angle of the OBB bounding box in the object information through a 3D model rotation angle calculator; recording a difference value obtained by subtracting the offset angle of the OBB bounding box from the angle of each reference plane one by one as an angle group angle _ group _ 1; adding 90 degrees to the angles in the angle group angle _ group _1 to form an angle group angle _ group _2 vertical to the angle group angle _ group _ 1; then, remapping all angles in the angle group angle _ group _1 and the angle group angle _ group _2 into angles ranging from 0 degree to 360 degrees respectively to obtain an angle group angle _ group _ 3; then, the angle group angle _ group _3 is reordered according to the angle values in ascending or descending order to form an angle group angle _ group _ 4; recording the minimum angle value which is greater than 0 in the angle group angle _ group _4 as the rotation angle of the 3D model;
step 4, rotating the 3D model; rotating coordinates of each node of the 3D model by taking the coordinates of the reference point in the object information as a center according to the rotation angle of the 3D model in the step 3; transmitting the object information of the rotated 3D model to the 3D model builder, and updating the object information of the corresponding 3D model by the 3D model builder;
step 5, drawing a 3D model; and the 3D model renderer acquires the updated object information of the 3D model in the step 4 from the 3D model builder, and draws the 3D model according to the object information.
5. The rotation angle self-matching method for 3D model based on rotation angle model library according to claim 4, wherein: the object information in step 1 includes: coordinates of each node of the 3D model, an offset angle of an OBB bounding box of the 3D model and coordinates of a rotation reference point in the OBB bounding box of the 3D model, wherein the method for acquiring the offset angle of the OBB bounding box comprises the following steps: and measuring the coordinates of each node of the OBB bounding box according to the coordinates of each node of the 3D model, projecting the coordinates of each node on the back of the OBB bounding box to the ground to form a projection line segment, and measuring the angle formed by the line segment on the ground and recording the angle as the offset angle of the OBB bounding box of the 3D model.
6. The rotation angle self-matching method for 3D model based on rotation angle model library according to claim 5, wherein: in step 2, firstly, coordinates of each node on the reference surface are obtained through a rotation angle model base builder, then, vertical projection is carried out on the ground to form a projection line segment, and the angle formed by the projection line segment on the ground is recorded to obtain the angle of the reference surface.
CN201611081176.XA 2016-11-30 2016-11-30 3D model rotation angle self-matching system and method based on rotation angle model library Active CN106780350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611081176.XA CN106780350B (en) 2016-11-30 2016-11-30 3D model rotation angle self-matching system and method based on rotation angle model library

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611081176.XA CN106780350B (en) 2016-11-30 2016-11-30 3D model rotation angle self-matching system and method based on rotation angle model library

Publications (2)

Publication Number Publication Date
CN106780350A CN106780350A (en) 2017-05-31
CN106780350B true CN106780350B (en) 2020-11-13

Family

ID=58898209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611081176.XA Active CN106780350B (en) 2016-11-30 2016-11-30 3D model rotation angle self-matching system and method based on rotation angle model library

Country Status (1)

Country Link
CN (1) CN106780350B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108846801A (en) * 2018-06-12 2018-11-20 佛山欧神诺云商科技有限公司 A kind of method and device thereof that model is adjusted by self-defining data
CN112172149B (en) * 2020-09-30 2021-09-03 深圳市创想三维科技股份有限公司 Method, device and equipment for automatically improving printing effect and storage medium
CN115145456A (en) * 2022-06-29 2022-10-04 重庆长安汽车股份有限公司 Rotation of 3D car model control system and control method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102374860B (en) * 2011-09-23 2014-10-01 奇瑞汽车股份有限公司 Three-dimensional visual positioning method and system
CN103969656A (en) * 2014-05-08 2014-08-06 北京数字绿土科技有限公司 Building modeling method and device based on airborne laser radar
US9898835B2 (en) * 2015-02-06 2018-02-20 Ming Chuan University Method for creating face replacement database
CN104637088B (en) * 2015-03-09 2018-04-20 王征 It is a kind of that 3D graphical virtuals managing and control system and its implementation are realized to intelligent appliance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
An Internet Virtual Reality Collaborative Environment for Effective Product Design;H.Y.Kan 等;《Computers in Industry》;20010630;第45卷(第2期);197-213 *
建构基于VRML/X3D的网上虚拟商店;谢文达;《中国优秀硕士学位论文全文数据库 信息科技辑》;20060915(第9期);I139-211 *

Also Published As

Publication number Publication date
CN106780350A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
US11704833B2 (en) Monocular vision tracking method, apparatus and non-transitory computer-readable storage medium
CN106780350B (en) 3D model rotation angle self-matching system and method based on rotation angle model library
US20150193971A1 (en) Methods and Systems for Generating a Map including Sparse and Dense Mapping Information
CN110505463A (en) Based on the real-time automatic 3D modeling method taken pictures
CN109724603A (en) A kind of Indoor Robot air navigation aid based on environmental characteristic detection
CN109840338B (en) Three-dimensional building model construction method applied to three-dimensional real estate information management
CN110319834A (en) A kind of method and robot of Indoor Robot positioning
US10991161B2 (en) Generating virtual representations
CN111862215B (en) Computer equipment positioning method and device, computer equipment and storage medium
CN110634100A (en) Household type graph generation method and device, electronic equipment and storage medium
KR101751697B1 (en) Visualization method and apparatus of transparent object through the connection between texturing of building shape and BIM data
CN109064482B (en) Method and device for automatically acquiring house outline in three-dimensional oblique photography scene
CN113626915B (en) Abnormal curtain wall construction deviation rectifying method, device, storage medium and system
CN113868739A (en) Multi-room indoor house type graph reconstruction method based on neural network
WO2019183928A1 (en) Indoor robot positioning method and robot
CN108932353B (en) Method for realizing positioning between building model and entity by applying mixed reality technology
CN111207672B (en) AR (augmented reality) measuring method
CN105698733B (en) House interior shape measurement method
WO2020034501A1 (en) Method and device for measuring room area
CN105824235A (en) Adaptive holder speed optimization method and adaptive holder speed optimization system
JP7043583B2 (en) How to generate augmented reality images
JP6607701B2 (en) Autonomous vacuum cleaner
CN106355638B (en) Shot-light light automatic regulating module system and method for adjustment
CN102995909A (en) Assembly method adopting coordinate rotation for spatial reticulated shells
US20230186508A1 (en) Modeling planar surfaces using direct plane fitting

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20191202

Address after: 210042 Xuanwu Avenue, Xuanwu District, Jiangsu, Nanjing 699-1

Applicant after: Taixuan Technology (Nanjing) Co., Ltd.

Address before: 210000, Jiangsu, Jiangning, Nanjing District, Rong Qiao family 7, 1003

Applicant before: Wang Zheng

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant