home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Houseplan Collection
/
HRCD2005.ISO
/
data1.cab
/
Zusatz
/
3DS
/
DATA2.Z
/
MainModule.bas
< prev
next >
Wrap
BASIC Source File
|
1998-09-17
|
2KB
|
46 lines
Attribute VB_Name = "MainModule"
Option Explicit
Dim exe As New ArCon.ArCon
Sub Main()
exe.StartMe 0, ""
If exe.Mode = AC_NoMode Then
exe.CreateProject exe.NewProject
End If
' ZunΣchst im Konstruktionsmodus eine Wand erzeugen
exe.Mode = AC_ModeConstruct
Dim rechteWand As ArCon.Wall, hintereWand As ArCon.Wall
Set rechteWand = exe.NewWall(0)
Set hintereWand = exe.NewWall(0)
exe.CurrentStory.PlaceWall rechteWand, 2, 2, 2, -2
exe.CurrentStory.PlaceWall hintereWand, 2, 2, -2, 2
' In den Designmodus und vor die Wand eine Wanne
exe.Mode = AC_ModeDesign
Dim c As ArCon.ObjectConstructor, i As ArCon.Object3D
Set c = exe.LoadObjectConstructor(">Bad\Wannen\BDWA02B.ACO", ACO_DURATION_CACHEABLE)
Set i = c.Create(Nothing, False)
' Gr÷▀e des geladenen Objektes ermitteln
Dim dx As Single, dy As Single, dz As Single
i.GetExtend False, dx, dy, dz
' Transformationsmatrix ermitteln
Dim m(3, 3) As Single
Dim xPos As Single, yPos As Single, zPos As Single
xPos = 2 - rechteWand.Thickness / 2 - dx / 2
yPos = 2 - hintereWand.Thickness / 2 - dy / 2
Dim s As ArCon.Story
Set s = exe.CurrentStory
zPos = s.BaseHeight + s.Rohdecke + s.Fussboden
m(0, 0) = 1: m(0, 1) = 0: m(0, 2) = 0: m(0, 3) = xPos
m(1, 0) = 0: m(1, 1) = 1: m(1, 2) = 0: m(1, 3) = yPos
m(2, 0) = 0: m(2, 1) = 0: m(2, 2) = 1: m(2, 3) = zPos
m(3, 0) = 0: m(3, 1) = 0: m(3, 2) = 0: m(3, 3) = 1
i.SetModelToWorldTransformation m
i.InsertIntoWorld False
End Sub