Hi All,
For DirectX, we can set the x, y, z, axis, but what is its unit?
pixel, or center meter or ?
ex: verts[0].X=150;
Best regards,
Boki.
///////////////////////////////////////////
public void OnCreateVertexBuffer(object sender, EventArgs e)
{
VertexBuffer vb = (VertexBuffer)sender;
GraphicsStream stm = vb.Lock(0, 0, 0);
CustomVertex.TransformedColored[] verts = new
CustomVertex.TransformedColored[3];
verts[0].X=150;verts[0].Y=50;verts[0].Z=0.5f; verts[0].Rhw=1;
verts[0].Color = System.Drawing.Color.Aqua.ToArgb();
verts[1].X=250;verts[1].Y=250;verts[1].Z=0.5f; verts[1].Rhw=1;
verts[1].Color = System.Drawing.Color.Brown.ToArgb();
verts[2].X=50;verts[2].Y=250;verts[2].Z=0.5f; verts[2].Rhw=1;
verts[2].Color = System.Drawing.Color.LightPink.ToArgb();
stm.Write(verts);
vb.Unlock();
}
////////////////////////// 2 1444
"Boki" <bo******@ms21.hinet.net> wrote: Hi All,
For DirectX, we can set the x, y, z, axis, but what is its unit?
pixel, or center meter or ? ex: verts[0].X=150;
The unit is whatever you want it to be, relative to your viewing
frustum. You can use a view matrix to scale it, etc.
-- Barry
Barry Kelly 寫道: "Boki" <bo******@ms21.hinet.net> wrote:
Hi All,
For DirectX, we can set the x, y, z, axis, but what is its unit?
pixel, or center meter or ? ex: verts[0].X=150;
The unit is whatever you want it to be, relative to your viewing frustum. You can use a view matrix to scale it, etc. -- Barry
Got it, thanks.
Best regards,
Boki. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tom |
last post by:
The Microsoft update page scans my computer which has
Windos XP Home Edition. The website recommends
installing both DirectX 9.0A end-user runtime and Managed
DirectX.
The problem is I have...
|
by: kastillo |
last post by:
Im trying to install directx 9.0 c , but i simply cant . When i run the installer it just says " The installed components are ready to use". This is the report on directx.log :
09/10/05...
|
by: Michael Mayer |
last post by:
First of all, sorry for the cross-post. Seems like there should be a
managed directx newsgroup.
I'm trying to open the following sample application that comes with the
DirectX SDK....
|
by: ammd |
last post by:
Hi, I installed Microsoft DirectX 9.0 SDK (Summer 2004) but when I create a project and try to add the necessary references I can't find them. Does anybody know where to look for them? BTW, I have VS...
|
by: Diego_Atos |
last post by:
I want to create objects using directX. I downloaded SDK version of
DirectX. I've installed it.
Which is the right dll to add to references?
I can't find it.
thanks
--
-Diego (Atos)-
|
by: Junaid Hussain |
last post by:
Hi,
I am thinking about developing a 3D pool game in C# using DirectX, however
when I compile a C# at the command prompt using; csc PoolGame.cs , I get the
following error message;
The type or...
|
by: Mike P |
last post by:
Problems, problems...
Im trying to create DirectX Projects within C# and to also look at the
latest DirectX C# Samples.
I have just installed MS Visual C# .net Standard Edition on my Windows...
|
by: Harvey Cohen |
last post by:
Hello all,
I have some C# code that implements calls to DirectX.DirectSound. It
compiles under both VS .NET 2003 and VS 2005 and runs under VS .NET 2003
and VS 2005 on a Compaq laptop (Windows...
|
by: raylopez99 |
last post by:
I just downloaded the apparently free SDK for DirectX 9, all 200+ MB
of it, but as I read about WPF I wonder: is DirectX obsolete? Should
I even bother learning how to use it? After all, the end...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |